[{"data":1,"prerenderedAt":3465},["ShallowReactive",2],{"navigation":3,"\u002Fguides\u002Frust":116,"\u002Fguides\u002Frust-surround":3460},[4,27,53,74,108,112],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":23,"path":24,"stem":25},"Example app and development","\u002Fgetting-started\u002Fdevelopment","1.getting-started\u002F4.development",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Guides","i-lucide-book-open","\u002Fguides","2.guides",[33,37,41,45,49],{"title":34,"path":35,"stem":36},"JavaScript API","\u002Fguides\u002Fjavascript-api","2.guides\u002F1.javascript-api",{"title":38,"path":39,"stem":40},"AT commands, exchange and CMUX","\u002Fguides\u002Fat-commands","2.guides\u002F2.at-commands",{"title":42,"path":43,"stem":44},"Rust","\u002Fguides\u002Frust","2.guides\u002F3.rust",{"title":46,"path":47,"stem":48},"Permissions","\u002Fguides\u002Fpermissions","2.guides\u002F4.permissions",{"title":50,"path":51,"stem":52},"Parsers","\u002Fguides\u002Fparsers","2.guides\u002F5.parsers",{"title":54,"icon":55,"path":56,"stem":57,"children":58,"page":26},"API reference","i-lucide-file-code","\u002Freference","3.reference",[59,63,67,71],{"title":60,"path":61,"stem":62},"SerialPort","\u002Freference\u002Fserial-port","3.reference\u002F1.serial-port",{"title":64,"path":65,"stem":66},"Types","\u002Freference\u002Ftypes","3.reference\u002F2.types",{"title":68,"path":69,"stem":70},"Tauri commands","\u002Freference\u002Fcommands","3.reference\u002F3.commands",{"title":46,"path":72,"stem":73},"\u002Freference\u002Fpermissions","3.reference\u002F4.permissions",{"title":75,"icon":76,"path":77,"stem":78,"children":79,"page":26},"Platforms","i-lucide-monitor-smartphone","\u002Fplatforms","4.platforms",[80,84,88,92,96,100,104],{"title":81,"path":82,"stem":83},"Overview","\u002Fplatforms\u002Foverview","4.platforms\u002F1.overview",{"title":85,"path":86,"stem":87},"Desktop","\u002Fplatforms\u002Fdesktop","4.platforms\u002F2.desktop",{"title":89,"path":90,"stem":91},"Android (USB)","\u002Fplatforms\u002Fandroid","4.platforms\u002F3.android",{"title":93,"path":94,"stem":95},"iOS","\u002Fplatforms\u002Fios","4.platforms\u002F4.ios",{"title":97,"path":98,"stem":99},"Serial over TCP","\u002Fplatforms\u002Ftcp","4.platforms\u002F5.tcp",{"title":101,"path":102,"stem":103},"Bluetooth LE (BLE)","\u002Fplatforms\u002Fble","4.platforms\u002F6.ble",{"title":105,"path":106,"stem":107},"DTR \u002F RTS on open","\u002Fplatforms\u002Fdtr-rts","4.platforms\u002F7.dtr-rts",{"title":109,"path":110,"stem":111},"Migration guide","\u002Fmigration","5.migration",{"title":113,"path":114,"stem":115},"Changelog","\u002Fchangelog","9.changelog",{"id":117,"title":42,"body":118,"description":3454,"extension":3455,"generated":26,"links":3456,"meta":3457,"navigation":310,"path":43,"seo":3458,"stem":44,"__hash__":3459},"docs\u002F2.guides\u002F3.rust.md",{"type":119,"value":120,"toc":3443},"minimark",[121,133,138,244,251,266,716,719,911,958,984,988,1003,1050,1731,1764,1768,1778,1886,1928,2554,2559,2610,2663,2676,2686,2703,2707,2729,2966,3007,3011,3059,3063,3107,3133,3137,3148,3271,3401,3415,3439],[122,123,124,125,132],"p",{},"The JavaScript API is a thin layer over Rust; the same operations are available in\nyour Tauri backend. Full item docs: ",[126,127,131],"a",{"href":128,"rel":129},"https:\u002F\u002Fdocs.rs\u002Ftauri-plugin-serialplugin\u002F",[130],"nofollow","docs.rs",".",[134,135,137],"h2",{"id":136},"setup","Setup",[139,140,145],"pre",{"className":141,"code":142,"language":143,"meta":144,"style":144},"language-rust shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F src-tauri\u002Fsrc\u002Flib.rs\ntauri::Builder::default()\n    .plugin(tauri_plugin_serialplugin::init())\n    .run(tauri::generate_context!())\n    .expect(\"error while running tauri application\");\n","rust","",[146,147,148,157,180,203,222],"code",{"__ignoreMap":144},[149,150,153],"span",{"class":151,"line":152},"line",1,[149,154,156],{"class":155},"sHwdD","\u002F\u002F src-tauri\u002Fsrc\u002Flib.rs\n",[149,158,160,164,168,171,173,177],{"class":151,"line":159},2,[149,161,163],{"class":162},"sBMFI","tauri",[149,165,167],{"class":166},"sMK4o","::",[149,169,170],{"class":162},"Builder",[149,172,167],{"class":166},[149,174,176],{"class":175},"s2Zo4","default",[149,178,179],{"class":166},"()\n",[149,181,183,186,189,192,195,197,200],{"class":151,"line":182},3,[149,184,185],{"class":166},"    .",[149,187,188],{"class":175},"plugin",[149,190,191],{"class":166},"(",[149,193,194],{"class":162},"tauri_plugin_serialplugin",[149,196,167],{"class":166},[149,198,199],{"class":175},"init",[149,201,202],{"class":166},"())\n",[149,204,206,208,211,213,215,217,220],{"class":151,"line":205},4,[149,207,185],{"class":166},[149,209,210],{"class":175},"run",[149,212,191],{"class":166},[149,214,163],{"class":162},[149,216,167],{"class":166},[149,218,219],{"class":175},"generate_context!",[149,221,202],{"class":166},[149,223,225,227,230,232,235,239,241],{"class":151,"line":224},5,[149,226,185],{"class":166},[149,228,229],{"class":175},"expect",[149,231,191],{"class":166},[149,233,234],{"class":166},"\"",[149,236,238],{"class":237},"sfazB","error while running tauri application",[149,240,234],{"class":166},[149,242,243],{"class":166},");\n",[134,245,247,248,250],{"id":246},"the-serialport-state-recommended","The ",[146,249,60],{}," state (recommended)",[122,252,253,254,257,258,261,262,265],{},"The plugin manages a ",[146,255,256],{},"tauri_plugin_serialplugin::api::SerialPort\u003CR>",". Its methods\nare synchronous and may block (open, read with timeout), so call them from a\nblocking context, for example an ",[146,259,260],{},"async"," command plus ",[146,263,264],{},"spawn_blocking",":",[139,267,269],{"className":141,"code":268,"language":143,"meta":144,"style":144},"use tauri::State;\nuse tauri_plugin_serialplugin::api::SerialPort;\n\n#[tauri::command]\nasync fn modem_signal(serial: State\u003C'_, SerialPort\u003Ctauri::Wry>>) -> Result\u003CString, String> {\n    let serial = serial.inner().clone();\n    tauri::async_runtime::spawn_blocking(move || {\n        let path = \"\u002Fdev\u002FttyUSB0\".to_string();\n        serial.open(path.clone(), 115_200, None, None, None, None, Some(1000))?;\n        let reply = serial.at(path.clone(), \"AT+CSQ\".into(), None)?;\n        serial.close(path)?;\n        Ok::\u003C_, tauri_plugin_serialplugin::error::Error>(reply.lines.join(\"\\n\"))\n    })\n    .await\n    .map_err(|e| e.to_string())?\n    .map_err(|e| e.to_string())\n}\n",[146,270,271,288,306,312,328,395,425,450,476,532,578,594,647,653,662,689,710],{"__ignoreMap":144},[149,272,273,277,280,282,285],{"class":151,"line":152},[149,274,276],{"class":275},"sbssI","use",[149,278,279],{"class":162}," tauri",[149,281,167],{"class":166},[149,283,284],{"class":162},"State",[149,286,287],{"class":166},";\n",[149,289,290,292,295,297,300,302,304],{"class":151,"line":159},[149,291,276],{"class":275},[149,293,294],{"class":162}," tauri_plugin_serialplugin",[149,296,167],{"class":166},[149,298,299],{"class":162},"api",[149,301,167],{"class":166},[149,303,60],{"class":162},[149,305,287],{"class":166},[149,307,308],{"class":151,"line":182},[149,309,311],{"emptyLinePlaceholder":310},true,"\n",[149,313,314,317,320,322,325],{"class":151,"line":205},[149,315,316],{"class":166},"#[",[149,318,163],{"class":319},"sTEyZ",[149,321,167],{"class":166},[149,323,324],{"class":319},"command",[149,326,327],{"class":166},"]\n",[149,329,330,332,335,338,340,343,345,348,351,354,357,360,363,365,367,370,373,376,379,381,384,386,389,392],{"class":151,"line":224},[149,331,260],{"class":275},[149,333,334],{"class":275}," fn",[149,336,337],{"class":175}," modem_signal",[149,339,191],{"class":166},[149,341,342],{"class":319},"serial",[149,344,265],{"class":166},[149,346,347],{"class":162}," State",[149,349,350],{"class":166},"\u003C'",[149,352,353],{"class":162},"_",[149,355,356],{"class":166},",",[149,358,359],{"class":162}," SerialPort",[149,361,362],{"class":166},"\u003C",[149,364,163],{"class":319},[149,366,167],{"class":166},[149,368,369],{"class":162},"Wry",[149,371,372],{"class":166},">>)",[149,374,375],{"class":166}," ->",[149,377,378],{"class":162}," Result",[149,380,362],{"class":166},[149,382,383],{"class":162},"String",[149,385,356],{"class":166},[149,387,388],{"class":162}," String",[149,390,391],{"class":166},">",[149,393,394],{"class":166}," {\n",[149,396,398,402,405,408,411,413,416,419,422],{"class":151,"line":397},6,[149,399,401],{"class":400},"spNyl","    let",[149,403,404],{"class":319}," serial ",[149,406,407],{"class":166},"=",[149,409,410],{"class":319}," serial",[149,412,132],{"class":166},[149,414,415],{"class":175},"inner",[149,417,418],{"class":166},"().",[149,420,421],{"class":175},"clone",[149,423,424],{"class":166},"();\n",[149,426,428,431,433,436,438,440,442,445,448],{"class":151,"line":427},7,[149,429,430],{"class":162},"    tauri",[149,432,167],{"class":166},[149,434,435],{"class":162},"async_runtime",[149,437,167],{"class":166},[149,439,264],{"class":175},[149,441,191],{"class":166},[149,443,444],{"class":275},"move",[149,446,447],{"class":166}," ||",[149,449,394],{"class":166},[149,451,453,456,459,461,464,467,469,471,474],{"class":151,"line":452},8,[149,454,455],{"class":400},"        let",[149,457,458],{"class":319}," path ",[149,460,407],{"class":166},[149,462,463],{"class":166}," \"",[149,465,466],{"class":237},"\u002Fdev\u002FttyUSB0",[149,468,234],{"class":166},[149,470,132],{"class":166},[149,472,473],{"class":175},"to_string",[149,475,424],{"class":166},[149,477,479,482,484,487,489,492,494,496,499,502,504,507,509,511,513,515,517,519,521,524,526,529],{"class":151,"line":478},9,[149,480,481],{"class":319},"        serial",[149,483,132],{"class":166},[149,485,486],{"class":175},"open",[149,488,191],{"class":166},[149,490,491],{"class":319},"path",[149,493,132],{"class":166},[149,495,421],{"class":175},[149,497,498],{"class":166},"(),",[149,500,501],{"class":275}," 115_200",[149,503,356],{"class":166},[149,505,506],{"class":162}," None",[149,508,356],{"class":166},[149,510,506],{"class":162},[149,512,356],{"class":166},[149,514,506],{"class":162},[149,516,356],{"class":166},[149,518,506],{"class":162},[149,520,356],{"class":166},[149,522,523],{"class":162}," Some",[149,525,191],{"class":166},[149,527,528],{"class":275},"1000",[149,530,531],{"class":166},"))?;\n",[149,533,535,537,540,542,544,546,549,551,553,555,557,559,561,564,566,568,571,573,575],{"class":151,"line":534},10,[149,536,455],{"class":400},[149,538,539],{"class":319}," reply ",[149,541,407],{"class":166},[149,543,410],{"class":319},[149,545,132],{"class":166},[149,547,548],{"class":175},"at",[149,550,191],{"class":166},[149,552,491],{"class":319},[149,554,132],{"class":166},[149,556,421],{"class":175},[149,558,498],{"class":166},[149,560,463],{"class":166},[149,562,563],{"class":237},"AT+CSQ",[149,565,234],{"class":166},[149,567,132],{"class":166},[149,569,570],{"class":175},"into",[149,572,498],{"class":166},[149,574,506],{"class":162},[149,576,577],{"class":166},")?;\n",[149,579,581,583,585,588,590,592],{"class":151,"line":580},11,[149,582,481],{"class":319},[149,584,132],{"class":166},[149,586,587],{"class":175},"close",[149,589,191],{"class":166},[149,591,491],{"class":319},[149,593,577],{"class":166},[149,595,597,600,603,605,607,609,611,614,616,619,622,625,627,630,632,635,637,639,642,644],{"class":151,"line":596},12,[149,598,599],{"class":162},"        Ok",[149,601,602],{"class":166},"::\u003C",[149,604,353],{"class":319},[149,606,356],{"class":166},[149,608,294],{"class":162},[149,610,167],{"class":166},[149,612,613],{"class":162},"error",[149,615,167],{"class":166},[149,617,618],{"class":162},"Error",[149,620,621],{"class":166},">(",[149,623,624],{"class":319},"reply",[149,626,132],{"class":166},[149,628,629],{"class":319},"lines",[149,631,132],{"class":166},[149,633,634],{"class":175},"join",[149,636,191],{"class":166},[149,638,234],{"class":166},[149,640,641],{"class":319},"\\n",[149,643,234],{"class":166},[149,645,646],{"class":166},"))\n",[149,648,650],{"class":151,"line":649},13,[149,651,652],{"class":166},"    })\n",[149,654,656,658],{"class":151,"line":655},14,[149,657,185],{"class":166},[149,659,661],{"class":660},"s7zQu","await\n",[149,663,665,667,670,673,676,679,682,684,686],{"class":151,"line":664},15,[149,666,185],{"class":166},[149,668,669],{"class":175},"map_err",[149,671,672],{"class":166},"(|",[149,674,675],{"class":319},"e",[149,677,678],{"class":166},"|",[149,680,681],{"class":319}," e",[149,683,132],{"class":166},[149,685,473],{"class":175},[149,687,688],{"class":166},"())?\n",[149,690,692,694,696,698,700,702,704,706,708],{"class":151,"line":691},16,[149,693,185],{"class":166},[149,695,669],{"class":175},[149,697,672],{"class":166},[149,699,675],{"class":319},[149,701,678],{"class":166},[149,703,681],{"class":319},[149,705,132],{"class":166},[149,707,473],{"class":175},[149,709,202],{"class":166},[149,711,713],{"class":151,"line":712},17,[149,714,715],{"class":166},"}\n",[122,717,718],{},"Main methods (same names as the JS API in snake_case):",[720,721,722,735],"table",{},[723,724,725],"thead",{},[726,727,728,732],"tr",{},[729,730,731],"th",{},"Group",[729,733,734],{},"Methods",[736,737,738,759,781,809,837,853],"tbody",{},[726,739,740,744],{},[741,742,743],"td",{},"Discovery",[741,745,746,749,750,749,753,749,756],{},[146,747,748],{},"available_ports(single_port_per_device)",", ",[146,751,752],{},"managed_ports()",[146,754,755],{},"watch_ports(options, channel)",[146,757,758],{},"unwatch_ports(id)",[726,760,761,764],{},[741,762,763],{},"Lifecycle",[741,765,766,749,769,749,772,749,775,749,778],{},[146,767,768],{},"open(path, baud, data_bits, flow, parity, stop_bits, timeout_ms)",[146,770,771],{},"open_with_lines(…, ModemLinesOnOpen { dtr, rts })",[146,773,774],{},"close(path)",[146,776,777],{},"close_all()",[146,779,780],{},"force_close(path)",[726,782,783,786],{},[741,784,785],{},"I\u002FO",[741,787,788,749,791,749,794,749,797,749,800,749,803,749,806],{},[146,789,790],{},"write(path, text)",[146,792,793],{},"write_binary(path, bytes)",[146,795,796],{},"read(path, timeout, size)",[146,798,799],{},"read_binary(…)",[146,801,802],{},"cancel_read(path)",[146,804,805],{},"watch(path, options, channel)",[146,807,808],{},"unwatch(id)",[726,810,811,814],{},[741,812,813],{},"AT \u002F exchange",[741,815,816,749,819,749,822,749,825,749,828,749,831,749,834],{},[146,817,818],{},"exchange(path, text, options)",[146,820,821],{},"exchange_binary(…)",[146,823,824],{},"at(path, command, options)",[146,826,827],{},"at_phases(path, phases)",[146,829,830],{},"send_sms_pdu(path, len, pdu, options)",[146,832,833],{},"configure_at_session(path, session)",[146,835,836],{},"cancel_exchange(path)",[726,838,839,842],{},[741,840,841],{},"CMUX",[741,843,844,749,847,749,850],{},[146,845,846],{},"enable_mux(path, command, timeout_ms)",[146,848,849],{},"open_mux_channel(path, dlci)",[146,851,852],{},"disable_mux(path)",[726,854,855,858],{},[741,856,857],{},"Settings \u002F lines",[741,859,860,749,863,749,866,749,869,749,872,749,875,749,878,749,881,749,884,749,887,749,890,749,893,749,896,749,899,749,902,749,905,749,908],{},[146,861,862],{},"set_baud_rate",[146,864,865],{},"set_data_bits",[146,867,868],{},"set_flow_control",[146,870,871],{},"set_parity",[146,873,874],{},"set_stop_bits",[146,876,877],{},"set_timeout",[146,879,880],{},"write_request_to_send",[146,882,883],{},"write_data_terminal_ready",[146,885,886],{},"read_clear_to_send",[146,888,889],{},"read_data_set_ready",[146,891,892],{},"read_ring_indicator",[146,894,895],{},"read_carrier_detect",[146,897,898],{},"bytes_to_read",[146,900,901],{},"bytes_to_write",[146,903,904],{},"clear_buffer",[146,906,907],{},"set_break",[146,909,910],{},"clear_break",[122,912,913,914,917,918,749,921,924,925,749,928,749,931,749,934,749,937,940,941,917,944,749,947,924,950,953,954,957],{},"Types live in ",[146,915,916],{},"tauri_plugin_serialplugin::state"," (",[146,919,920],{},"DataBits",[146,922,923],{},"Parity",",\n",[146,926,927],{},"StopBits",[146,929,930],{},"FlowControl",[146,932,933],{},"ClearBuffer",[146,935,936],{},"LogLevel",[146,938,939],{},"ModemLinesOnOpen",") and\n",[146,942,943],{},"tauri_plugin_serialplugin::events",[146,945,946],{},"WatchOptions",[146,948,949],{},"ExchangeOptions",[146,951,952],{},"SerialEvent",", …). Errors are ",[146,955,956],{},"tauri_plugin_serialplugin::error::Error",", which\nserializes to its message string.",[122,959,960,963,964,967,968,971,972,975,976,979,980,983],{},[146,961,962],{},"SerialPort\u003CR>"," derefs to ",[146,965,966],{},"serialplugin_core::SerialManager"," (see below), so every method\nabove is the core's; only ",[146,969,970],{},"watch"," \u002F ",[146,973,974],{},"watch_ports"," take a Tauri ",[146,977,978],{},"Channel"," here.\n",[146,981,982],{},"serial.core()"," hands out the Tauri-free manager itself.",[134,985,987],{"id":986},"using-the-core-without-tauri","Using the core without Tauri",[122,989,990,991,998,999,1002],{},"Everything except the Tauri glue lives in the\n",[126,992,995],{"href":993,"rel":994},"https:\u002F\u002Fgithub.com\u002Fs00d\u002Ftauri-plugin-serialplugin\u002Ftree\u002Fmain\u002Fcrates\u002Fserialplugin-core",[130],[146,996,997],{},"serialplugin-core","\ncrate (also re-exported as ",[146,1000,1001],{},"tauri_plugin_serialplugin::serialplugin_core","). It has no Tauri\ndependency, so a headless service (a gateway driving many modems, a CLI) can use the\nsame hub, parsers, AT queue and CMUX directly:",[139,1004,1008],{"className":1005,"code":1006,"language":1007,"meta":144,"style":144},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[dependencies]\nserialplugin-core = { git = \"https:\u002F\u002Fgithub.com\u002Fs00d\u002Ftauri-plugin-serialplugin\" }\n# features = [\"ble\"] for ble:\u002F\u002F on desktop, iOS and Android\n","toml",[146,1009,1010,1020,1045],{"__ignoreMap":144},[149,1011,1012,1015,1018],{"class":151,"line":152},[149,1013,1014],{"class":166},"[",[149,1016,1017],{"class":162},"dependencies",[149,1019,327],{"class":166},[149,1021,1022,1025,1027,1030,1033,1035,1037,1040,1042],{"class":151,"line":159},[149,1023,1024],{"class":319},"serialplugin-core ",[149,1026,407],{"class":166},[149,1028,1029],{"class":166}," {",[149,1031,1032],{"class":319}," git ",[149,1034,407],{"class":166},[149,1036,463],{"class":166},[149,1038,1039],{"class":237},"https:\u002F\u002Fgithub.com\u002Fs00d\u002Ftauri-plugin-serialplugin",[149,1041,234],{"class":166},[149,1043,1044],{"class":166}," }\n",[149,1046,1047],{"class":151,"line":182},[149,1048,1049],{"class":155},"# features = [\"ble\"] for ble:\u002F\u002F on desktop, iOS and Android\n",[139,1051,1053],{"className":141,"code":1052,"language":143,"meta":144,"style":144},"use serialplugin_core::events::{EventSink, SerialEvent, WatchOptions};\nuse serialplugin_core::SerialManager;\nuse std::sync::Arc;\n\nlet serial = SerialManager::new();\nlet path = serial.open(\"\u002Fdev\u002FttyUSB0\".into(), 115_200, None, None, None, None, None)?;\n\n\u002F\u002F Runs on the port's RX thread (the last remainder on unwatch \u002F close may come on the\n\u002F\u002F caller's thread), never under a manager lock: keep it short, e.g. forward into a tokio channel.\nlet (tx, mut rx) = tokio::sync::mpsc::unbounded_channel();\nlet sink: EventSink = Arc::new(move |event| tx.send(event).is_ok());\nlet parser = serde_json::from_str(r#\"{ \"type\": \"readline\", \"delimiter\": \"\\r\\n\" }\"#)?;\nlet watch_id = serial.watch_framed(path.clone(), WatchOptions::default(), Some(parser), sink)?;\n\nlet reply = tokio::task::spawn_blocking({\n    let (serial, path) = (serial.clone(), path.clone());\n    move || serial.at(path, \"AT+CSQ\".into(), None)\n})\n.await??;\n\nwhile let Some(event) = rx.recv().await {\n    match event {\n        SerialEvent::Data { data, .. } => println!(\"{}\", String::from_utf8_lossy(&data)),\n        SerialEvent::Urc { line, .. } => println!(\"URC {line}\"),\n        SerialEvent::Disconnect { .. } => break,\n        SerialEvent::Error { message, .. } => eprintln!(\"{message}\"),\n    }\n}\nserial.unwatch(watch_id)?;\n",[146,1054,1055,1086,1099,1118,1122,1141,1193,1197,1202,1207,1249,1303,1336,1384,1388,1410,1445,1481,1487,1498,1503,1535,1547,1600,1643,1666,1703,1709,1714],{"__ignoreMap":144},[149,1056,1057,1059,1062,1064,1067,1070,1073,1075,1078,1080,1083],{"class":151,"line":152},[149,1058,276],{"class":275},[149,1060,1061],{"class":162}," serialplugin_core",[149,1063,167],{"class":166},[149,1065,1066],{"class":162},"events",[149,1068,1069],{"class":166},"::{",[149,1071,1072],{"class":162},"EventSink",[149,1074,356],{"class":166},[149,1076,1077],{"class":162}," SerialEvent",[149,1079,356],{"class":166},[149,1081,1082],{"class":162}," WatchOptions",[149,1084,1085],{"class":166},"};\n",[149,1087,1088,1090,1092,1094,1097],{"class":151,"line":159},[149,1089,276],{"class":275},[149,1091,1061],{"class":162},[149,1093,167],{"class":166},[149,1095,1096],{"class":162},"SerialManager",[149,1098,287],{"class":166},[149,1100,1101,1103,1106,1108,1111,1113,1116],{"class":151,"line":182},[149,1102,276],{"class":275},[149,1104,1105],{"class":162}," std",[149,1107,167],{"class":166},[149,1109,1110],{"class":162},"sync",[149,1112,167],{"class":166},[149,1114,1115],{"class":162},"Arc",[149,1117,287],{"class":166},[149,1119,1120],{"class":151,"line":205},[149,1121,311],{"emptyLinePlaceholder":310},[149,1123,1124,1127,1129,1131,1134,1136,1139],{"class":151,"line":224},[149,1125,1126],{"class":400},"let",[149,1128,404],{"class":319},[149,1130,407],{"class":166},[149,1132,1133],{"class":162}," SerialManager",[149,1135,167],{"class":166},[149,1137,1138],{"class":175},"new",[149,1140,424],{"class":166},[149,1142,1143,1145,1147,1149,1151,1153,1155,1157,1159,1161,1163,1165,1167,1169,1171,1173,1175,1177,1179,1181,1183,1185,1187,1189,1191],{"class":151,"line":397},[149,1144,1126],{"class":400},[149,1146,458],{"class":319},[149,1148,407],{"class":166},[149,1150,410],{"class":319},[149,1152,132],{"class":166},[149,1154,486],{"class":175},[149,1156,191],{"class":166},[149,1158,234],{"class":166},[149,1160,466],{"class":237},[149,1162,234],{"class":166},[149,1164,132],{"class":166},[149,1166,570],{"class":175},[149,1168,498],{"class":166},[149,1170,501],{"class":275},[149,1172,356],{"class":166},[149,1174,506],{"class":162},[149,1176,356],{"class":166},[149,1178,506],{"class":162},[149,1180,356],{"class":166},[149,1182,506],{"class":162},[149,1184,356],{"class":166},[149,1186,506],{"class":162},[149,1188,356],{"class":166},[149,1190,506],{"class":162},[149,1192,577],{"class":166},[149,1194,1195],{"class":151,"line":427},[149,1196,311],{"emptyLinePlaceholder":310},[149,1198,1199],{"class":151,"line":452},[149,1200,1201],{"class":155},"\u002F\u002F Runs on the port's RX thread (the last remainder on unwatch \u002F close may come on the\n",[149,1203,1204],{"class":151,"line":478},[149,1205,1206],{"class":155},"\u002F\u002F caller's thread), never under a manager lock: keep it short, e.g. forward into a tokio channel.\n",[149,1208,1209,1211,1213,1216,1218,1221,1224,1227,1230,1233,1235,1237,1239,1242,1244,1247],{"class":151,"line":534},[149,1210,1126],{"class":400},[149,1212,917],{"class":166},[149,1214,1215],{"class":319},"tx",[149,1217,356],{"class":166},[149,1219,1220],{"class":400}," mut",[149,1222,1223],{"class":319}," rx",[149,1225,1226],{"class":166},")",[149,1228,1229],{"class":166}," =",[149,1231,1232],{"class":162}," tokio",[149,1234,167],{"class":166},[149,1236,1110],{"class":162},[149,1238,167],{"class":166},[149,1240,1241],{"class":162},"mpsc",[149,1243,167],{"class":166},[149,1245,1246],{"class":175},"unbounded_channel",[149,1248,424],{"class":166},[149,1250,1251,1253,1256,1258,1261,1263,1266,1268,1270,1272,1274,1277,1280,1282,1285,1287,1290,1292,1294,1297,1300],{"class":151,"line":580},[149,1252,1126],{"class":400},[149,1254,1255],{"class":319}," sink",[149,1257,265],{"class":166},[149,1259,1260],{"class":162}," EventSink",[149,1262,1229],{"class":166},[149,1264,1265],{"class":162}," Arc",[149,1267,167],{"class":166},[149,1269,1138],{"class":175},[149,1271,191],{"class":166},[149,1273,444],{"class":275},[149,1275,1276],{"class":166}," |",[149,1278,1279],{"class":319},"event",[149,1281,678],{"class":166},[149,1283,1284],{"class":319}," tx",[149,1286,132],{"class":166},[149,1288,1289],{"class":175},"send",[149,1291,191],{"class":166},[149,1293,1279],{"class":319},[149,1295,1296],{"class":166},").",[149,1298,1299],{"class":175},"is_ok",[149,1301,1302],{"class":166},"());\n",[149,1304,1305,1307,1310,1312,1315,1317,1320,1322,1325,1328,1331,1334],{"class":151,"line":596},[149,1306,1126],{"class":400},[149,1308,1309],{"class":319}," parser ",[149,1311,407],{"class":166},[149,1313,1314],{"class":162}," serde_json",[149,1316,167],{"class":166},[149,1318,1319],{"class":175},"from_str",[149,1321,191],{"class":166},[149,1323,1324],{"class":237},"r",[149,1326,1327],{"class":166},"#\"",[149,1329,1330],{"class":237},"{ \"type\": \"readline\", \"delimiter\": \"\\r\\n\" }",[149,1332,1333],{"class":166},"\"#",[149,1335,577],{"class":166},[149,1337,1338,1340,1343,1345,1347,1349,1352,1354,1356,1358,1360,1362,1364,1366,1368,1370,1372,1374,1377,1380,1382],{"class":151,"line":649},[149,1339,1126],{"class":400},[149,1341,1342],{"class":319}," watch_id ",[149,1344,407],{"class":166},[149,1346,410],{"class":319},[149,1348,132],{"class":166},[149,1350,1351],{"class":175},"watch_framed",[149,1353,191],{"class":166},[149,1355,491],{"class":319},[149,1357,132],{"class":166},[149,1359,421],{"class":175},[149,1361,498],{"class":166},[149,1363,1082],{"class":162},[149,1365,167],{"class":166},[149,1367,176],{"class":175},[149,1369,498],{"class":166},[149,1371,523],{"class":162},[149,1373,191],{"class":166},[149,1375,1376],{"class":319},"parser",[149,1378,1379],{"class":166},"),",[149,1381,1255],{"class":319},[149,1383,577],{"class":166},[149,1385,1386],{"class":151,"line":655},[149,1387,311],{"emptyLinePlaceholder":310},[149,1389,1390,1392,1394,1396,1398,1400,1403,1405,1407],{"class":151,"line":664},[149,1391,1126],{"class":400},[149,1393,539],{"class":319},[149,1395,407],{"class":166},[149,1397,1232],{"class":162},[149,1399,167],{"class":166},[149,1401,1402],{"class":162},"task",[149,1404,167],{"class":166},[149,1406,264],{"class":175},[149,1408,1409],{"class":166},"({\n",[149,1411,1412,1414,1416,1418,1420,1423,1425,1427,1429,1431,1433,1435,1437,1439,1441,1443],{"class":151,"line":691},[149,1413,401],{"class":400},[149,1415,917],{"class":166},[149,1417,342],{"class":319},[149,1419,356],{"class":166},[149,1421,1422],{"class":319}," path",[149,1424,1226],{"class":166},[149,1426,1229],{"class":166},[149,1428,917],{"class":166},[149,1430,342],{"class":319},[149,1432,132],{"class":166},[149,1434,421],{"class":175},[149,1436,498],{"class":166},[149,1438,1422],{"class":319},[149,1440,132],{"class":166},[149,1442,421],{"class":175},[149,1444,1302],{"class":166},[149,1446,1447,1450,1452,1454,1456,1458,1460,1462,1464,1466,1468,1470,1472,1474,1476,1478],{"class":151,"line":712},[149,1448,1449],{"class":275},"    move",[149,1451,447],{"class":166},[149,1453,410],{"class":319},[149,1455,132],{"class":166},[149,1457,548],{"class":175},[149,1459,191],{"class":166},[149,1461,491],{"class":319},[149,1463,356],{"class":166},[149,1465,463],{"class":166},[149,1467,563],{"class":237},[149,1469,234],{"class":166},[149,1471,132],{"class":166},[149,1473,570],{"class":175},[149,1475,498],{"class":166},[149,1477,506],{"class":162},[149,1479,1480],{"class":166},")\n",[149,1482,1484],{"class":151,"line":1483},18,[149,1485,1486],{"class":166},"})\n",[149,1488,1490,1492,1495],{"class":151,"line":1489},19,[149,1491,132],{"class":166},[149,1493,1494],{"class":660},"await",[149,1496,1497],{"class":166},"??;\n",[149,1499,1501],{"class":151,"line":1500},20,[149,1502,311],{"emptyLinePlaceholder":310},[149,1504,1506,1509,1512,1514,1516,1518,1520,1522,1524,1526,1529,1531,1533],{"class":151,"line":1505},21,[149,1507,1508],{"class":660},"while",[149,1510,1511],{"class":400}," let",[149,1513,523],{"class":162},[149,1515,191],{"class":166},[149,1517,1279],{"class":319},[149,1519,1226],{"class":166},[149,1521,1229],{"class":166},[149,1523,1223],{"class":319},[149,1525,132],{"class":166},[149,1527,1528],{"class":175},"recv",[149,1530,418],{"class":166},[149,1532,1494],{"class":660},[149,1534,394],{"class":166},[149,1536,1538,1541,1544],{"class":151,"line":1537},22,[149,1539,1540],{"class":660},"    match",[149,1542,1543],{"class":319}," event ",[149,1545,1546],{"class":166},"{\n",[149,1548,1550,1553,1555,1558,1560,1563,1565,1568,1571,1574,1577,1579,1582,1584,1586,1588,1591,1594,1597],{"class":151,"line":1549},23,[149,1551,1552],{"class":162},"        SerialEvent",[149,1554,167],{"class":166},[149,1556,1557],{"class":162},"Data",[149,1559,1029],{"class":166},[149,1561,1562],{"class":319}," data",[149,1564,356],{"class":166},[149,1566,1567],{"class":166}," ..",[149,1569,1570],{"class":166}," }",[149,1572,1573],{"class":166}," =>",[149,1575,1576],{"class":175}," println!",[149,1578,191],{"class":166},[149,1580,1581],{"class":166},"\"{}\"",[149,1583,356],{"class":166},[149,1585,388],{"class":162},[149,1587,167],{"class":166},[149,1589,1590],{"class":175},"from_utf8_lossy",[149,1592,1593],{"class":166},"(&",[149,1595,1596],{"class":319},"data",[149,1598,1599],{"class":166},")),\n",[149,1601,1603,1605,1607,1610,1612,1615,1617,1619,1621,1623,1625,1627,1629,1632,1635,1637,1640],{"class":151,"line":1602},24,[149,1604,1552],{"class":162},[149,1606,167],{"class":166},[149,1608,1609],{"class":162},"Urc",[149,1611,1029],{"class":166},[149,1613,1614],{"class":319}," line",[149,1616,356],{"class":166},[149,1618,1567],{"class":166},[149,1620,1570],{"class":166},[149,1622,1573],{"class":166},[149,1624,1576],{"class":175},[149,1626,191],{"class":166},[149,1628,234],{"class":166},[149,1630,1631],{"class":237},"URC ",[149,1633,1634],{"class":166},"{",[149,1636,151],{"class":237},[149,1638,1639],{"class":166},"}\"",[149,1641,1642],{"class":166},"),\n",[149,1644,1646,1648,1650,1653,1655,1657,1659,1661,1664],{"class":151,"line":1645},25,[149,1647,1552],{"class":162},[149,1649,167],{"class":166},[149,1651,1652],{"class":162},"Disconnect",[149,1654,1029],{"class":166},[149,1656,1567],{"class":166},[149,1658,1570],{"class":166},[149,1660,1573],{"class":166},[149,1662,1663],{"class":660}," break",[149,1665,924],{"class":166},[149,1667,1669,1671,1673,1675,1677,1680,1682,1684,1686,1688,1691,1693,1696,1699,1701],{"class":151,"line":1668},26,[149,1670,1552],{"class":162},[149,1672,167],{"class":166},[149,1674,618],{"class":162},[149,1676,1029],{"class":166},[149,1678,1679],{"class":319}," message",[149,1681,356],{"class":166},[149,1683,1567],{"class":166},[149,1685,1570],{"class":166},[149,1687,1573],{"class":166},[149,1689,1690],{"class":175}," eprintln!",[149,1692,191],{"class":166},[149,1694,1695],{"class":166},"\"{",[149,1697,1698],{"class":237},"message",[149,1700,1639],{"class":166},[149,1702,1642],{"class":166},[149,1704,1706],{"class":151,"line":1705},27,[149,1707,1708],{"class":166},"    }\n",[149,1710,1712],{"class":151,"line":1711},28,[149,1713,715],{"class":166},[149,1715,1717,1719,1721,1724,1726,1729],{"class":151,"line":1716},29,[149,1718,342],{"class":319},[149,1720,132],{"class":166},[149,1722,1723],{"class":175},"unwatch",[149,1725,191],{"class":166},[149,1727,1728],{"class":319},"watch_id",[149,1730,577],{"class":166},[122,1732,1733,1734,1737,1738,1741,1742,749,1744,1747,1748,1751,1752,971,1754,1757,1758,1760,1761,132],{},"The method set is the table above. Differences from the plugin: ",[146,1735,1736],{},"watch(path, options, sink)"," and ",[146,1739,1740],{},"watch_ports(options, sink)"," take closures (",[146,1743,1072],{},[146,1745,1746],{},"PortListSink",";\nreturn ",[146,1749,1750],{},"false"," once the receiver is gone) and return their own id for\n",[146,1753,1723],{},[146,1755,1756],{},"unwatch_ports",". Methods block, so call them from ",[146,1759,264],{}," or a\nplain thread. Example: ",[146,1762,1763],{},"cargo run -p serialplugin-core --example headless -- \u002Fdev\u002FttyUSB0",[134,1765,1767],{"id":1766},"core-api-42","Core API (4.2)",[122,1769,1770,1771,1773,1774,1777],{},"The methods above keep their 4.x signatures, errors and behaviour. New code can use\nthese core-only additions (reachable from the plugin's ",[146,1772,962],{}," through ",[146,1775,1776],{},"Deref","):",[720,1779,1780,1789],{},[723,1781,1782],{},[726,1783,1784,1787],{},[729,1785,1786],{},"Method",[729,1788],{},[736,1790,1791,1830,1847,1860,1870],{},[726,1792,1793,1810],{},[741,1794,1795,749,1798,749,1801,749,1804,749,1807],{},[146,1796,1797],{},"open_core",[146,1799,1800],{},"close_core",[146,1802,1803],{},"write_core",[146,1805,1806],{},"exchange_core",[146,1808,1809],{},"at_core",[741,1811,1812,1813,971,1816,971,1818,971,1821,971,1824,1826,1827],{},"Same as ",[146,1814,1815],{},"open_with_lines",[146,1817,587],{},[146,1819,1820],{},"write_binary",[146,1822,1823],{},"exchange_binary",[146,1825,548],{},", but return ",[146,1828,1829],{},"CoreError",[726,1831,1832,1840],{},[741,1833,1834,749,1837],{},[146,1835,1836],{},"watch_core(path, options, parser, sink) -> SubscriptionId",[146,1838,1839],{},"unwatch_core(id)",[741,1841,1842,1843,1846],{},"Any number of streams per port, each with its own parser \u002F ",[146,1844,1845],{},"routeUrc"," state",[726,1848,1849,1857],{},[741,1850,1851,749,1854],{},[146,1852,1853],{},"subscribe_core(sink) -> SubscriptionId",[146,1855,1856],{},"unsubscribe_core(id)",[741,1858,1859],{},"Port states of every port: opened, disconnected (kind + reason), closed",[726,1861,1862,1867],{},[741,1863,1864],{},[146,1865,1866],{},"set_core_queue_capacity(bytes)",[741,1868,1869],{},"Queue limit of new core receivers (default 4 MiB)",[726,1871,1872,1877],{},[741,1873,1874],{},[146,1875,1876],{},"insert_port(path, Box\u003Cdyn SerialPort>)",[741,1878,1879,1880,1882,1883,1885],{},"Manage your own ",[146,1881,60],{}," (a fake device in tests) as if ",[146,1884,486],{}," had opened it",[122,1887,1888,1890,1891,917,1894,749,1897,749,1900,749,1903,924,1906,749,1909,749,1912,1915,1916,1919,1920,1923,1924,1927],{},[146,1889,1829],{}," has a ",[146,1892,1893],{},"kind()",[146,1895,1896],{},"NotFound",[146,1898,1899],{},"PermissionDenied",[146,1901,1902],{},"Busy",[146,1904,1905],{},"Disconnected",[146,1907,1908],{},"Timeout",[146,1910,1911],{},"Cancelled",[146,1913,1914],{},"Other","), the 4.x message as ",[146,1917,1918],{},"Display"," and the platform error as\n",[146,1921,1922],{},"source()","; ",[146,1925,1926],{},"Error::from(core_error)"," gives the old error with the same text.",[139,1929,1931],{"className":141,"code":1930,"language":143,"meta":144,"style":144},"use serialplugin_core::events::{CoreEvent, CoreSink, PortStatus, SerialEvent, WatchOptions};\nuse serialplugin_core::ErrorKind;\nuse std::sync::Arc;\n\nlet states: CoreSink = Arc::new(|event| {\n    if let CoreEvent::PortState { path, state: PortStatus::Disconnected { kind, reason } } = event {\n        eprintln!(\"{path} lost ({kind:?}): {reason}\");\n    }\n    true\n});\nserial.subscribe_core(states);\n\nlet path = \"\u002Fdev\u002FttyUSB1\".to_string();\nmatch serial.open_core(path.clone(), 115_200, None, None, None, None, None, Default::default()) {\n    Err(e) if e.kind() == ErrorKind::Busy => { \u002F* opened elsewhere: retry later *\u002F }\n    other => { other?; }\n}\nlet (line_tx, line_rx) = std::sync::mpsc::channel::\u003CVec\u003Cu8>>();\nlet lines: CoreSink = Arc::new(move |event| match event {\n    CoreEvent::Event(SerialEvent::Data { data, .. }) => line_tx.send(data).is_ok(),\n    CoreEvent::Overflow { dropped_from } => { eprintln!(\"lost data from byte {dropped_from}\"); false }\n    _ => true,\n});\nlet parser = serde_json::from_str(r#\"{ \"type\": \"readline\" }\"#)?;\nlet id = serial.watch_core(path.clone(), WatchOptions::default(), Some(parser), lines)?;\n",[146,1932,1933,1968,1981,1997,2001,2028,2080,2115,2119,2124,2129,2145,2149,2170,2227,2270,2288,2292,2338,2374,2423,2467,2477,2481,2508],{"__ignoreMap":144},[149,1934,1935,1937,1939,1941,1943,1945,1948,1950,1953,1955,1958,1960,1962,1964,1966],{"class":151,"line":152},[149,1936,276],{"class":275},[149,1938,1061],{"class":162},[149,1940,167],{"class":166},[149,1942,1066],{"class":162},[149,1944,1069],{"class":166},[149,1946,1947],{"class":162},"CoreEvent",[149,1949,356],{"class":166},[149,1951,1952],{"class":162}," CoreSink",[149,1954,356],{"class":166},[149,1956,1957],{"class":162}," PortStatus",[149,1959,356],{"class":166},[149,1961,1077],{"class":162},[149,1963,356],{"class":166},[149,1965,1082],{"class":162},[149,1967,1085],{"class":166},[149,1969,1970,1972,1974,1976,1979],{"class":151,"line":159},[149,1971,276],{"class":275},[149,1973,1061],{"class":162},[149,1975,167],{"class":166},[149,1977,1978],{"class":162},"ErrorKind",[149,1980,287],{"class":166},[149,1982,1983,1985,1987,1989,1991,1993,1995],{"class":151,"line":182},[149,1984,276],{"class":275},[149,1986,1105],{"class":162},[149,1988,167],{"class":166},[149,1990,1110],{"class":162},[149,1992,167],{"class":166},[149,1994,1115],{"class":162},[149,1996,287],{"class":166},[149,1998,1999],{"class":151,"line":205},[149,2000,311],{"emptyLinePlaceholder":310},[149,2002,2003,2005,2008,2010,2012,2014,2016,2018,2020,2022,2024,2026],{"class":151,"line":224},[149,2004,1126],{"class":400},[149,2006,2007],{"class":319}," states",[149,2009,265],{"class":166},[149,2011,1952],{"class":162},[149,2013,1229],{"class":166},[149,2015,1265],{"class":162},[149,2017,167],{"class":166},[149,2019,1138],{"class":175},[149,2021,672],{"class":166},[149,2023,1279],{"class":319},[149,2025,678],{"class":166},[149,2027,394],{"class":166},[149,2029,2030,2033,2035,2038,2040,2043,2045,2047,2049,2051,2053,2055,2057,2059,2061,2064,2066,2069,2072,2074,2076,2078],{"class":151,"line":397},[149,2031,2032],{"class":660},"    if",[149,2034,1511],{"class":400},[149,2036,2037],{"class":162}," CoreEvent",[149,2039,167],{"class":166},[149,2041,2042],{"class":162},"PortState",[149,2044,1029],{"class":166},[149,2046,1422],{"class":319},[149,2048,356],{"class":166},[149,2050,1846],{"class":319},[149,2052,265],{"class":166},[149,2054,1957],{"class":162},[149,2056,167],{"class":166},[149,2058,1905],{"class":162},[149,2060,1029],{"class":166},[149,2062,2063],{"class":319}," kind",[149,2065,356],{"class":166},[149,2067,2068],{"class":319}," reason ",[149,2070,2071],{"class":166},"}",[149,2073,1570],{"class":166},[149,2075,1229],{"class":166},[149,2077,1543],{"class":319},[149,2079,1546],{"class":166},[149,2081,2082,2085,2087,2089,2091,2093,2096,2098,2101,2103,2106,2108,2111,2113],{"class":151,"line":427},[149,2083,2084],{"class":175},"        eprintln!",[149,2086,191],{"class":166},[149,2088,1695],{"class":166},[149,2090,491],{"class":237},[149,2092,2071],{"class":166},[149,2094,2095],{"class":237}," lost (",[149,2097,1634],{"class":166},[149,2099,2100],{"class":237},"kind:?",[149,2102,2071],{"class":166},[149,2104,2105],{"class":237},"): ",[149,2107,1634],{"class":166},[149,2109,2110],{"class":237},"reason",[149,2112,1639],{"class":166},[149,2114,243],{"class":166},[149,2116,2117],{"class":151,"line":452},[149,2118,1708],{"class":166},[149,2120,2121],{"class":151,"line":478},[149,2122,2123],{"class":166},"    true\n",[149,2125,2126],{"class":151,"line":534},[149,2127,2128],{"class":166},"});\n",[149,2130,2131,2133,2135,2138,2140,2143],{"class":151,"line":580},[149,2132,342],{"class":319},[149,2134,132],{"class":166},[149,2136,2137],{"class":175},"subscribe_core",[149,2139,191],{"class":166},[149,2141,2142],{"class":319},"states",[149,2144,243],{"class":166},[149,2146,2147],{"class":151,"line":596},[149,2148,311],{"emptyLinePlaceholder":310},[149,2150,2151,2153,2155,2157,2159,2162,2164,2166,2168],{"class":151,"line":649},[149,2152,1126],{"class":400},[149,2154,458],{"class":319},[149,2156,407],{"class":166},[149,2158,463],{"class":166},[149,2160,2161],{"class":237},"\u002Fdev\u002FttyUSB1",[149,2163,234],{"class":166},[149,2165,132],{"class":166},[149,2167,473],{"class":175},[149,2169,424],{"class":166},[149,2171,2172,2175,2177,2179,2181,2183,2185,2187,2189,2191,2193,2195,2197,2199,2201,2203,2205,2207,2209,2211,2213,2215,2218,2220,2222,2225],{"class":151,"line":655},[149,2173,2174],{"class":660},"match",[149,2176,410],{"class":319},[149,2178,132],{"class":166},[149,2180,1797],{"class":175},[149,2182,191],{"class":166},[149,2184,491],{"class":319},[149,2186,132],{"class":166},[149,2188,421],{"class":175},[149,2190,498],{"class":166},[149,2192,501],{"class":275},[149,2194,356],{"class":166},[149,2196,506],{"class":162},[149,2198,356],{"class":166},[149,2200,506],{"class":162},[149,2202,356],{"class":166},[149,2204,506],{"class":162},[149,2206,356],{"class":166},[149,2208,506],{"class":162},[149,2210,356],{"class":166},[149,2212,506],{"class":162},[149,2214,356],{"class":166},[149,2216,2217],{"class":162}," Default",[149,2219,167],{"class":166},[149,2221,176],{"class":175},[149,2223,2224],{"class":166},"())",[149,2226,394],{"class":166},[149,2228,2229,2232,2234,2236,2238,2241,2243,2245,2248,2251,2254,2257,2259,2261,2263,2265,2268],{"class":151,"line":664},[149,2230,2231],{"class":162},"    Err",[149,2233,191],{"class":166},[149,2235,675],{"class":319},[149,2237,1226],{"class":166},[149,2239,2240],{"class":660}," if",[149,2242,681],{"class":319},[149,2244,132],{"class":166},[149,2246,2247],{"class":175},"kind",[149,2249,2250],{"class":166},"()",[149,2252,2253],{"class":166}," ==",[149,2255,2256],{"class":162}," ErrorKind",[149,2258,167],{"class":166},[149,2260,1902],{"class":162},[149,2262,1573],{"class":166},[149,2264,1029],{"class":166},[149,2266,2267],{"class":155}," \u002F* opened elsewhere: retry later *\u002F",[149,2269,1044],{"class":166},[149,2271,2272,2275,2278,2280,2283,2286],{"class":151,"line":691},[149,2273,2274],{"class":319},"    other ",[149,2276,2277],{"class":166},"=>",[149,2279,1029],{"class":166},[149,2281,2282],{"class":319}," other",[149,2284,2285],{"class":166},"?;",[149,2287,1044],{"class":166},[149,2289,2290],{"class":151,"line":712},[149,2291,715],{"class":166},[149,2293,2294,2296,2298,2301,2303,2306,2308,2310,2312,2314,2316,2318,2320,2322,2325,2327,2330,2332,2335],{"class":151,"line":1483},[149,2295,1126],{"class":400},[149,2297,917],{"class":166},[149,2299,2300],{"class":319},"line_tx",[149,2302,356],{"class":166},[149,2304,2305],{"class":319}," line_rx",[149,2307,1226],{"class":166},[149,2309,1229],{"class":166},[149,2311,1105],{"class":162},[149,2313,167],{"class":166},[149,2315,1110],{"class":162},[149,2317,167],{"class":166},[149,2319,1241],{"class":162},[149,2321,167],{"class":166},[149,2323,2324],{"class":175},"channel",[149,2326,602],{"class":166},[149,2328,2329],{"class":162},"Vec",[149,2331,362],{"class":166},[149,2333,2334],{"class":162},"u8",[149,2336,2337],{"class":166},">>();\n",[149,2339,2340,2342,2345,2347,2349,2351,2353,2355,2357,2359,2361,2363,2365,2367,2370,2372],{"class":151,"line":1489},[149,2341,1126],{"class":400},[149,2343,2344],{"class":319}," lines",[149,2346,265],{"class":166},[149,2348,1952],{"class":162},[149,2350,1229],{"class":166},[149,2352,1265],{"class":162},[149,2354,167],{"class":166},[149,2356,1138],{"class":175},[149,2358,191],{"class":166},[149,2360,444],{"class":275},[149,2362,1276],{"class":166},[149,2364,1279],{"class":319},[149,2366,678],{"class":166},[149,2368,2369],{"class":660}," match",[149,2371,1543],{"class":319},[149,2373,1546],{"class":166},[149,2375,2376,2379,2381,2384,2386,2388,2390,2392,2394,2396,2398,2400,2403,2405,2408,2410,2412,2414,2416,2418,2420],{"class":151,"line":1500},[149,2377,2378],{"class":162},"    CoreEvent",[149,2380,167],{"class":166},[149,2382,2383],{"class":175},"Event",[149,2385,191],{"class":166},[149,2387,952],{"class":162},[149,2389,167],{"class":166},[149,2391,1557],{"class":162},[149,2393,1029],{"class":166},[149,2395,1562],{"class":319},[149,2397,356],{"class":166},[149,2399,1567],{"class":166},[149,2401,2402],{"class":166}," })",[149,2404,1573],{"class":166},[149,2406,2407],{"class":319}," line_tx",[149,2409,132],{"class":166},[149,2411,1289],{"class":175},[149,2413,191],{"class":166},[149,2415,1596],{"class":319},[149,2417,1296],{"class":166},[149,2419,1299],{"class":175},[149,2421,2422],{"class":166},"(),\n",[149,2424,2425,2427,2429,2432,2434,2437,2439,2441,2443,2445,2447,2449,2452,2454,2457,2459,2462,2465],{"class":151,"line":1505},[149,2426,2378],{"class":162},[149,2428,167],{"class":166},[149,2430,2431],{"class":162},"Overflow",[149,2433,1029],{"class":166},[149,2435,2436],{"class":319}," dropped_from ",[149,2438,2071],{"class":166},[149,2440,1573],{"class":166},[149,2442,1029],{"class":166},[149,2444,1690],{"class":175},[149,2446,191],{"class":166},[149,2448,234],{"class":166},[149,2450,2451],{"class":237},"lost data from byte ",[149,2453,1634],{"class":166},[149,2455,2456],{"class":237},"dropped_from",[149,2458,1639],{"class":166},[149,2460,2461],{"class":166},");",[149,2463,2464],{"class":166}," false",[149,2466,1044],{"class":166},[149,2468,2469,2472,2474],{"class":151,"line":1537},[149,2470,2471],{"class":319},"    _ ",[149,2473,2277],{"class":166},[149,2475,2476],{"class":166}," true,\n",[149,2478,2479],{"class":151,"line":1549},[149,2480,2128],{"class":166},[149,2482,2483,2485,2487,2489,2491,2493,2495,2497,2499,2501,2504,2506],{"class":151,"line":1602},[149,2484,1126],{"class":400},[149,2486,1309],{"class":319},[149,2488,407],{"class":166},[149,2490,1314],{"class":162},[149,2492,167],{"class":166},[149,2494,1319],{"class":175},[149,2496,191],{"class":166},[149,2498,1324],{"class":237},[149,2500,1327],{"class":166},[149,2502,2503],{"class":237},"{ \"type\": \"readline\" }",[149,2505,1333],{"class":166},[149,2507,577],{"class":166},[149,2509,2510,2512,2515,2517,2519,2521,2524,2526,2528,2530,2532,2534,2536,2538,2540,2542,2544,2546,2548,2550,2552],{"class":151,"line":1645},[149,2511,1126],{"class":400},[149,2513,2514],{"class":319}," id ",[149,2516,407],{"class":166},[149,2518,410],{"class":319},[149,2520,132],{"class":166},[149,2522,2523],{"class":175},"watch_core",[149,2525,191],{"class":166},[149,2527,491],{"class":319},[149,2529,132],{"class":166},[149,2531,421],{"class":175},[149,2533,498],{"class":166},[149,2535,1082],{"class":162},[149,2537,167],{"class":166},[149,2539,176],{"class":175},[149,2541,498],{"class":166},[149,2543,523],{"class":162},[149,2545,191],{"class":166},[149,2547,1376],{"class":319},[149,2549,1379],{"class":166},[149,2551,2344],{"class":319},[149,2553,577],{"class":166},[122,2555,2556,2558],{},[146,2557,1902],{}," means the port exists but is in use (another process holds it; on Windows\n\"Access is denied\" in any system language, since a port that is listed but cannot be\nopened counts as busy).",[122,2560,2561,2562,1737,2564,2566,2567,971,2570,2573,2574,2577,2578,2580,2581,2584,2585,2587,2588,2591,2592,2594,2595,2597,2598,2600,2601,971,2604,2606,2607,2609],{},"Delivery: ",[146,2563,2523],{},[146,2565,2137],{}," sinks run on their own delivery thread, so\na slow one never stalls RX, ",[146,2568,2569],{},"at()",[146,2571,2572],{},"exchange"," or ",[146,2575,2576],{},"close()",", and it may call ",[146,2579,2569],{}," on\nthe same port. Its queue is bounded: when it is full the sink gets\n",[146,2582,2583],{},"CoreEvent::Overflow { dropped_from }"," (byte offset of its data stream) and is\nunsubscribed; the port and the other subscribers carry on. A core sink returning ",[146,2586,1750],{},"\nis unsubscribed too (",[146,2589,2590],{},"unwatch_core"," on it is then ",[146,2593,1896],{},"). The old ",[146,2596,970],{}," (and the\nplugin's Tauri ",[146,2599,978],{},") keeps the 4.x timing: its sink runs on the RX side, loses\nnothing, and gets nothing after ",[146,2602,2603],{},"unwatch()",[146,2605,2576],{}," has returned; a slow one holds\nup RX, so keep it short (a Tauri ",[146,2608,978],{}," send is).",[122,2611,2612,2613,2615,2616,2618,2619,2622,2623,2625,2626,2628,2629,971,2631,2633,2634,2636,2637,2640,2641,2643,2644,2646,2647,2650,2651,2653,2654,2656,2657,2659,2660,2662],{},"Lifecycle: on a real disconnect (EOF, I\u002FO error, unplug) every stream gets ",[146,2614,1652],{},"\nonce, ",[146,2617,2137],{}," gets ",[146,2620,2621],{},"PortState { Disconnected { kind: Disconnected, reason } }","\nand the core releases the port (both handles, its CMUX channels). Until ",[146,2624,2576],{}," the\npath behaves as in 4.x: ",[146,2627,752],{}," still lists it, a ",[146,2630,970],{},[146,2632,2523],{},"\nstarted now gets that ",[146,2635,1652],{}," at once, and other calls fail with the disconnect\nreason (",[146,2638,2639],{},"\"Serial port disconnected: …\"",", kind ",[146,2642,1905],{},"). ",[146,2645,2576],{}," then removes\nit and succeeds once; ",[146,2648,2649],{},"open()"," on the path also starts afresh. An intentional\n",[146,2652,2576],{}," delivers what the hub still holds (batch, parser remainder) and sends no\n",[146,2655,1652],{},". \"One watch per port\" applies to the old ",[146,2658,970],{}," only, per\n",[146,2661,1096],{},"; a watch id is unique across managers (the 4.x global registry).",[122,2664,2665,2668,2669,2672,2673,132],{},[146,2666,2667],{},"insert_port"," on Unix splits a port with a working ",[146,2670,2671],{},"try_clone()"," into a read and a\nwrite handle: the clone must share the device (like a dup'ed fd), or return ",[146,2674,2675],{},"Err",[122,2677,2678,2679,2682,2683,2685],{},"On Unix, local serial ports get a second (cloned) handle for writes and control calls:\nwrites never wait for the RX hub, and the port timeout (",[146,2680,2681],{},"open(timeout)"," \u002F\n",[146,2684,877],{},") applies to them as set. TCP, BLE, Android and Windows keep one handle.",[122,2687,247,2688,2691,2692,2694,2695,2698,2699,2702],{},[146,2689,2690],{},"log"," cargo feature sends the core's logs through the ",[146,2693,2690],{}," crate instead of\nstdout \u002F stderr; ",[146,2696,2697],{},"test-util"," keeps ",[146,2700,2701],{},"mock_serial"," in every build.",[134,2704,2706],{"id":2705},"calling-the-tauri-commands-directly","Calling the Tauri commands directly",[122,2708,2709,2712,2713,2715,2716,749,2719,749,2722,1737,2725,2728],{},[146,2710,2711],{},"tauri_plugin_serialplugin::commands"," holds the functions behind the JS calls. The\nport I\u002FO ones are ",[146,2714,260],{}," (they run on Tauri's blocking pool) and must be awaited;\n",[146,2717,2718],{},"managed_ports",[146,2720,2721],{},"set_log_level",[146,2723,2724],{},"get_log_level",[146,2726,2727],{},"capabilities"," are\nsynchronous.",[139,2730,2732],{"className":141,"code":2731,"language":143,"meta":144,"style":144},"use tauri::{AppHandle, State};\nuse tauri_plugin_serialplugin::{api::SerialPort, commands};\n\n#[tauri::command]\nasync fn open_default(\n    app: AppHandle\u003Ctauri::Wry>,\n    serial: State\u003C'_, SerialPort\u003Ctauri::Wry>>,\n) -> Result\u003CString, String> {\n    commands::open(app, serial, \"COM3\".into(), 9600, None, None, None, None, None, None, None)\n        .await\n        .map_err(|e| e.to_string())\n}\n",[146,2733,2734,2751,2772,2776,2788,2800,2821,2849,2869,2935,2942,2962],{"__ignoreMap":144},[149,2735,2736,2738,2740,2742,2745,2747,2749],{"class":151,"line":152},[149,2737,276],{"class":275},[149,2739,279],{"class":162},[149,2741,1069],{"class":166},[149,2743,2744],{"class":162},"AppHandle",[149,2746,356],{"class":166},[149,2748,347],{"class":162},[149,2750,1085],{"class":166},[149,2752,2753,2755,2757,2759,2761,2763,2765,2767,2770],{"class":151,"line":159},[149,2754,276],{"class":275},[149,2756,294],{"class":162},[149,2758,1069],{"class":166},[149,2760,299],{"class":162},[149,2762,167],{"class":166},[149,2764,60],{"class":162},[149,2766,356],{"class":166},[149,2768,2769],{"class":162}," commands",[149,2771,1085],{"class":166},[149,2773,2774],{"class":151,"line":182},[149,2775,311],{"emptyLinePlaceholder":310},[149,2777,2778,2780,2782,2784,2786],{"class":151,"line":205},[149,2779,316],{"class":166},[149,2781,163],{"class":319},[149,2783,167],{"class":166},[149,2785,324],{"class":319},[149,2787,327],{"class":166},[149,2789,2790,2792,2794,2797],{"class":151,"line":224},[149,2791,260],{"class":275},[149,2793,334],{"class":275},[149,2795,2796],{"class":175}," open_default",[149,2798,2799],{"class":166},"(\n",[149,2801,2802,2805,2807,2810,2812,2814,2816,2818],{"class":151,"line":397},[149,2803,2804],{"class":319},"    app",[149,2806,265],{"class":166},[149,2808,2809],{"class":162}," AppHandle",[149,2811,362],{"class":166},[149,2813,163],{"class":319},[149,2815,167],{"class":166},[149,2817,369],{"class":162},[149,2819,2820],{"class":166},">,\n",[149,2822,2823,2826,2828,2830,2832,2834,2836,2838,2840,2842,2844,2846],{"class":151,"line":427},[149,2824,2825],{"class":319},"    serial",[149,2827,265],{"class":166},[149,2829,347],{"class":162},[149,2831,350],{"class":166},[149,2833,353],{"class":162},[149,2835,356],{"class":166},[149,2837,359],{"class":162},[149,2839,362],{"class":166},[149,2841,163],{"class":319},[149,2843,167],{"class":166},[149,2845,369],{"class":162},[149,2847,2848],{"class":166},">>,\n",[149,2850,2851,2853,2855,2857,2859,2861,2863,2865,2867],{"class":151,"line":452},[149,2852,1226],{"class":166},[149,2854,375],{"class":166},[149,2856,378],{"class":162},[149,2858,362],{"class":166},[149,2860,383],{"class":162},[149,2862,356],{"class":166},[149,2864,388],{"class":162},[149,2866,391],{"class":166},[149,2868,394],{"class":166},[149,2870,2871,2874,2876,2878,2880,2883,2885,2887,2889,2891,2894,2896,2898,2900,2902,2905,2907,2909,2911,2913,2915,2917,2919,2921,2923,2925,2927,2929,2931,2933],{"class":151,"line":478},[149,2872,2873],{"class":162},"    commands",[149,2875,167],{"class":166},[149,2877,486],{"class":175},[149,2879,191],{"class":166},[149,2881,2882],{"class":319},"app",[149,2884,356],{"class":166},[149,2886,410],{"class":319},[149,2888,356],{"class":166},[149,2890,463],{"class":166},[149,2892,2893],{"class":237},"COM3",[149,2895,234],{"class":166},[149,2897,132],{"class":166},[149,2899,570],{"class":175},[149,2901,498],{"class":166},[149,2903,2904],{"class":275}," 9600",[149,2906,356],{"class":166},[149,2908,506],{"class":162},[149,2910,356],{"class":166},[149,2912,506],{"class":162},[149,2914,356],{"class":166},[149,2916,506],{"class":162},[149,2918,356],{"class":166},[149,2920,506],{"class":162},[149,2922,356],{"class":166},[149,2924,506],{"class":162},[149,2926,356],{"class":166},[149,2928,506],{"class":162},[149,2930,356],{"class":166},[149,2932,506],{"class":162},[149,2934,1480],{"class":166},[149,2936,2937,2940],{"class":151,"line":534},[149,2938,2939],{"class":166},"        .",[149,2941,661],{"class":660},[149,2943,2944,2946,2948,2950,2952,2954,2956,2958,2960],{"class":151,"line":580},[149,2945,2939],{"class":166},[149,2947,669],{"class":175},[149,2949,672],{"class":166},[149,2951,675],{"class":319},[149,2953,678],{"class":166},[149,2955,681],{"class":319},[149,2957,132],{"class":166},[149,2959,473],{"class":175},[149,2961,202],{"class":166},[149,2963,2964],{"class":151,"line":596},[149,2965,715],{"class":166},[122,2967,2968,2971,2972,1737,2974,2976,2977,749,2979,924,2982,749,2985,749,2988,749,2991,749,2994,749,2997,749,3000,3003,3004,1296],{},[146,2969,2970],{},"commands::open"," takes, after ",[146,2973,2882],{},[146,2975,342],{},": ",[146,2978,491],{},[146,2980,2981],{},"baud_rate",[146,2983,2984],{},"data_bits",[146,2986,2987],{},"flow_control",[146,2989,2990],{},"parity",[146,2992,2993],{},"stop_bits",[146,2995,2996],{},"timeout",[146,2998,2999],{},"dtr",[146,3001,3002],{},"rts","\n(all but the first two are ",[146,3005,3006],{},"Option",[134,3008,3010],{"id":3009},"log-level","Log level",[139,3012,3014],{"className":141,"code":3013,"language":143,"meta":144,"style":144},"use tauri_plugin_serialplugin::state::{set_log_level, LogLevel};\n\nset_log_level(LogLevel::Error); \u002F\u002F before or after init(); JS can change it later\n",[146,3015,3016,3038,3042],{"__ignoreMap":144},[149,3017,3018,3020,3022,3024,3027,3029,3031,3033,3036],{"class":151,"line":152},[149,3019,276],{"class":275},[149,3021,294],{"class":162},[149,3023,167],{"class":166},[149,3025,3026],{"class":162},"state",[149,3028,1069],{"class":166},[149,3030,2721],{"class":162},[149,3032,356],{"class":166},[149,3034,3035],{"class":162}," LogLevel",[149,3037,1085],{"class":166},[149,3039,3040],{"class":151,"line":159},[149,3041,311],{"emptyLinePlaceholder":310},[149,3043,3044,3046,3048,3050,3052,3054,3056],{"class":151,"line":182},[149,3045,2721],{"class":175},[149,3047,191],{"class":166},[149,3049,936],{"class":162},[149,3051,167],{"class":166},[149,3053,618],{"class":162},[149,3055,2461],{"class":166},[149,3057,3058],{"class":155}," \u002F\u002F before or after init(); JS can change it later\n",[134,3060,3062],{"id":3061},"cargo-features","Cargo features",[720,3064,3065,3074],{},[723,3066,3067],{},[726,3068,3069,3072],{},[729,3070,3071],{},"Feature",[729,3073],{},[736,3075,3076,3097],{},[726,3077,3078,3083],{},[741,3079,3080],{},[146,3081,3082],{},"ble",[741,3084,3085,3086,3089,3090,3093,3094,132],{},"Serial over Bluetooth LE (",[146,3087,3088],{},"ble:\u002F\u002F","), desktop, iOS and Android. Needs ",[146,3091,3092],{},"libdbus-1-dev"," on Linux. See ",[126,3095,3096],{"href":102},"platforms",[726,3098,3099,3104],{},[741,3100,3101],{},[146,3102,3103],{},"android-test-harness",[741,3105,3106],{},"Fake USB transport for the JNI integration tests. Not for apps.",[122,3108,3109,3110,3112,3113,3115,3116,3118,3119,3121,3122,3124,3125,3128,3129,3132],{},"Core crate (",[146,3111,997],{},") only: ",[146,3114,2690],{}," (logs through the ",[146,3117,2690],{}," crate), ",[146,3120,2697],{},"\n(",[146,3123,2701],{}," in every build), ",[146,3126,3127],{},"usb-port-details"," (USB interface number and location\nin ",[146,3130,3131],{},"available_ports_detailed()","; off by default and not enabled by the plugin, see\nbelow).",[134,3134,3136],{"id":3135},"port-details","Port details",[122,3138,3139,3142,3143,3145,3146,265],{},[146,3140,3141],{},"available_ports()"," keeps the 4.x string map. For typed values — and to tell the ports\nof one composite device (a modem's AT \u002F NMEA \u002F diag ports share vid, pid and serial)\napart — use ",[146,3144,3131],{}," on the core ",[146,3147,1096],{},[139,3149,3151],{"className":141,"code":3150,"language":143,"meta":144,"style":144},"for p in serial.available_ports_detailed()? {\n    println!(\"{} {:04x?}:{:04x?} if={:?} at {:?}\", p.path, p.vid, p.pid, p.interface, p.location);\n}\n",[146,3152,3153,3176,3267],{"__ignoreMap":144},[149,3154,3155,3158,3161,3164,3166,3168,3171,3174],{"class":151,"line":152},[149,3156,3157],{"class":660},"for",[149,3159,3160],{"class":319}," p ",[149,3162,3163],{"class":275},"in",[149,3165,410],{"class":319},[149,3167,132],{"class":166},[149,3169,3170],{"class":175},"available_ports_detailed",[149,3172,3173],{"class":166},"()?",[149,3175,394],{"class":166},[149,3177,3178,3181,3183,3186,3188,3191,3193,3195,3197,3199,3201,3204,3206,3209,3211,3214,3216,3218,3220,3222,3225,3227,3229,3231,3233,3235,3238,3240,3242,3244,3247,3249,3251,3253,3256,3258,3260,3262,3265],{"class":151,"line":159},[149,3179,3180],{"class":175},"    println!",[149,3182,191],{"class":166},[149,3184,3185],{"class":166},"\"{}",[149,3187,1029],{"class":166},[149,3189,3190],{"class":237},":04x?",[149,3192,2071],{"class":166},[149,3194,265],{"class":237},[149,3196,1634],{"class":166},[149,3198,3190],{"class":237},[149,3200,2071],{"class":166},[149,3202,3203],{"class":237}," if=",[149,3205,1634],{"class":166},[149,3207,3208],{"class":237},":?",[149,3210,2071],{"class":166},[149,3212,3213],{"class":237}," at ",[149,3215,1634],{"class":166},[149,3217,3208],{"class":237},[149,3219,1639],{"class":166},[149,3221,356],{"class":166},[149,3223,3224],{"class":319}," p",[149,3226,132],{"class":166},[149,3228,491],{"class":319},[149,3230,356],{"class":166},[149,3232,3224],{"class":319},[149,3234,132],{"class":166},[149,3236,3237],{"class":319},"vid",[149,3239,356],{"class":166},[149,3241,3224],{"class":319},[149,3243,132],{"class":166},[149,3245,3246],{"class":319},"pid",[149,3248,356],{"class":166},[149,3250,3224],{"class":319},[149,3252,132],{"class":166},[149,3254,3255],{"class":319},"interface",[149,3257,356],{"class":166},[149,3259,3224],{"class":319},[149,3261,132],{"class":166},[149,3263,3264],{"class":319},"location",[149,3266,243],{"class":166},[149,3268,3269],{"class":151,"line":182},[149,3270,715],{"class":166},[720,3272,3273,3292],{},[723,3274,3275],{},[726,3276,3277,3280,3283,3286,3289],{},[729,3278,3279],{},"Field",[729,3281,3282],{},"Linux",[729,3284,3285],{},"macOS",[729,3287,3288],{},"Windows",[729,3290,3291],{},"Android",[736,3293,3294,3325,3342,3375],{},[726,3295,3296,3315,3318,3320,3323],{},[741,3297,3298,749,3300,917,3302,3305,3306,749,3309,749,3312],{},[146,3299,3237],{},[146,3301,3246],{},[146,3303,3304],{},"u16","), ",[146,3307,3308],{},"serial_number",[146,3310,3311],{},"manufacturer",[146,3313,3314],{},"product",[741,3316,3317],{},"yes",[741,3319,3317],{},[741,3321,3322],{},"yes (full serial)",[741,3324,3317],{},[726,3326,3327,3332,3334,3337,3339],{},[741,3328,3329,3331],{},[146,3330,3255],{}," (USB interface number) ¹",[741,3333,3317],{},[741,3335,3336],{},"yes (may be the data interface)",[741,3338,3317],{},[741,3340,3341],{},"no",[726,3343,3344,3352,3362,3368,3373],{},[741,3345,3346,917,3348,3351],{},[146,3347,3264],{},[146,3349,3350],{},"bus-port.port…",") ¹",[741,3353,3354,3355,3358,3359],{},"sysfs ",[146,3356,3357],{},"busnum","\u002F",[146,3360,3361],{},"devpath",[741,3363,3364,3365],{},"IOKit ",[146,3366,3367],{},"locationID",[741,3369,3370],{},[146,3371,3372],{},"LocationPaths",[741,3374,3341],{},[726,3376,3377,3385,3394,3397,3399],{},[741,3378,3379,749,3382],{},[146,3380,3381],{},"by_id",[146,3383,3384],{},"by_path",[741,3386,3387,749,3390,3393],{},[146,3388,3389],{},"\u002Fdev\u002Fserial\u002Fby-id",[146,3391,3392],{},"by-path"," links",[741,3395,3396],{},"empty",[741,3398,3396],{},[741,3400,3396],{},[122,3402,3403,3404,3407,3408,1737,3411,3414],{},"Unknown values are ",[146,3405,3406],{},"None",". Both macOS nodes (",[146,3409,3410],{},"cu.",[146,3412,3413],{},"tty.",") are listed. iOS returns\nan empty list.",[122,3416,3417,3418,3420,3421,3424,3425,3427,3428,971,3431,3434,3435,3438],{},"¹ Only with the core feature ",[146,3419,3127],{}," (add\n",[146,3422,3423],{},"serialplugin-core = { version = \"0.2\", features = [\"usb-port-details\"] }","), else\n",[146,3426,3406],{},". It turns on serialport's ",[146,3429,3430],{},"usbportinfo-interface",[146,3432,3433],{},"usbportinfo-location",",\nwhich add fields to ",[146,3436,3437],{},"serialport::UsbPortInfo"," for every crate in your build, and on\nLinux without libudev (musl) make serialport skip a USB port whose sysfs location\ncannot be read. With it the port-list monitor also reports a changed USB location on\none path as a re-plug.",[3440,3441,3442],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":144,"searchDepth":159,"depth":182,"links":3444},[3445,3446,3448,3449,3450,3451,3452,3453],{"id":136,"depth":159,"text":137},{"id":246,"depth":159,"text":3447},"The SerialPort state (recommended)",{"id":986,"depth":159,"text":987},{"id":1766,"depth":159,"text":1767},{"id":2705,"depth":159,"text":2706},{"id":3009,"depth":159,"text":3010},{"id":3061,"depth":159,"text":3062},{"id":3135,"depth":159,"text":3136},"Using the plugin from your Tauri backend.","md",null,{},{"title":42,"description":3454},"NmiquhgHHKy1D5q1BwfkwNtGZtmFgDspRpgdKIa2Tac",[3461,3463],{"title":38,"path":39,"stem":40,"description":3462,"children":-1},"Modem queue, SMS, URCs and multiplexing.",{"title":46,"path":47,"stem":48,"description":3464,"children":-1},"Capability identifiers for the plugin commands.",1794158000996]