[{"data":1,"prerenderedAt":1488},["ShallowReactive",2],{"navigation":3,"\u002Fguides\u002Frust":116,"\u002Fguides\u002Frust-surround":1483},[4,27,61,82,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},"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,53,57],{"title":34,"path":35,"stem":36},"Sessions and store","\u002Fguides\u002Fsessions","2.guides\u002F1.sessions",{"title":38,"path":39,"stem":40},"Vault and procedures","\u002Fguides\u002Fvault","2.guides\u002F2.vault",{"title":42,"path":43,"stem":44},"Password accounts","\u002Fguides\u002Fpasswords","2.guides\u002F3.passwords",{"title":46,"path":47,"stem":48},"Rust backend","\u002Fguides\u002Frust","2.guides\u002F4.rust",{"title":50,"path":51,"stem":52},"Security notes","\u002Fguides\u002Fsecurity","2.guides\u002F5.security",{"title":54,"path":55,"stem":56},"Permissions","\u002Fguides\u002Fpermissions","2.guides\u002F6.permissions",{"title":58,"path":59,"stem":60},"Coming from Stronghold","\u002Fguides\u002Fstronghold","2.guides\u002F7.stronghold",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":26},"API reference","i-lucide-file-code","\u002Freference","3.reference",[67,71,75,79],{"title":68,"path":69,"stem":70},"JavaScript API","\u002Freference\u002Fjavascript-api","3.reference\u002F1.javascript-api",{"title":72,"path":73,"stem":74},"Types","\u002Freference\u002Ftypes","3.reference\u002F2.types",{"title":76,"path":77,"stem":78},"Tauri commands","\u002Freference\u002Fcommands","3.reference\u002F3.commands",{"title":54,"path":80,"stem":81},"\u002Freference\u002Fpermissions","3.reference\u002F4.permissions",{"title":83,"icon":84,"path":85,"stem":86,"children":87,"page":26},"Platforms","i-lucide-monitor-smartphone","\u002Fplatforms","4.platforms",[88,92,96,100,104,108],{"title":89,"path":90,"stem":91},"Overview","\u002Fplatforms\u002Foverview","4.platforms\u002F1.overview",{"title":93,"path":94,"stem":95},"macOS","\u002Fplatforms\u002Fmacos","4.platforms\u002F2.macos",{"title":97,"path":98,"stem":99},"Windows","\u002Fplatforms\u002Fwindows","4.platforms\u002F3.windows",{"title":101,"path":102,"stem":103},"Linux","\u002Fplatforms\u002Flinux","4.platforms\u002F4.linux",{"title":105,"path":106,"stem":107},"Android","\u002Fplatforms\u002Fandroid","4.platforms\u002F5.android",{"title":109,"path":110,"stem":111},"iOS","\u002Fplatforms\u002Fios","4.platforms\u002F6.ios",{"title":113,"path":114,"stem":115},"Changelog","\u002Fchangelog","9.changelog",{"id":117,"title":46,"body":118,"description":1477,"extension":1478,"generated":26,"links":1479,"meta":1480,"navigation":186,"path":47,"seo":1481,"stem":48,"__hash__":1482},"docs\u002F2.guides\u002F4.rust.md",{"type":119,"value":120,"toc":1467},"minimark",[121,150,350,359,416,423,585,596,601,606,776,779,783,786,957,961,971,1021,1028,1032,1048,1079,1093,1097,1102,1170,1320,1333,1337,1347,1460,1463],[122,123,124,125,129,130,133,134,137,138,141,142,149],"p",{},"The plugin's state is available on every ",[126,127,128],"code",{},"App",", ",[126,131,132],{},"AppHandle"," and ",[126,135,136],{},"WebviewWindow"," through the\n",[126,139,140],{},"KeyringExt"," trait. Full API: ",[143,144,148],"a",{"href":145,"rel":146},"https:\u002F\u002Fdocs.rs\u002Ftauri-plugin-keyring-store",[147],"nofollow","docs.rs",".",[151,152,157],"pre",{"className":153,"code":154,"language":155,"meta":156,"style":156},"language-rust shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use tauri_plugin_keyring_store::KeyringExt;\n\n#[tauri::command]\nfn save_api_token(app: tauri::AppHandle, token: String) -> Result\u003C(), String> {\n    app.keyring()\n        .store\n        .set_password(\"app.api_token\", &token)\n        .map_err(|e| e.to_string())\n}\n","rust","",[126,158,159,181,188,206,263,277,286,316,344],{"__ignoreMap":156},[160,161,164,168,172,176,178],"span",{"class":162,"line":163},"line",1,[160,165,167],{"class":166},"sbssI","use",[160,169,171],{"class":170},"sBMFI"," tauri_plugin_keyring_store",[160,173,175],{"class":174},"sMK4o","::",[160,177,140],{"class":170},[160,179,180],{"class":174},";\n",[160,182,184],{"class":162,"line":183},2,[160,185,187],{"emptyLinePlaceholder":186},true,"\n",[160,189,191,194,198,200,203],{"class":162,"line":190},3,[160,192,193],{"class":174},"#[",[160,195,197],{"class":196},"sTEyZ","tauri",[160,199,175],{"class":174},[160,201,202],{"class":196},"command",[160,204,205],{"class":174},"]\n",[160,207,209,212,216,219,222,225,228,230,232,235,238,240,243,246,249,252,255,257,260],{"class":162,"line":208},4,[160,210,211],{"class":166},"fn",[160,213,215],{"class":214},"s2Zo4"," save_api_token",[160,217,218],{"class":174},"(",[160,220,221],{"class":196},"app",[160,223,224],{"class":174},":",[160,226,227],{"class":170}," tauri",[160,229,175],{"class":174},[160,231,132],{"class":170},[160,233,234],{"class":174},",",[160,236,237],{"class":196}," token",[160,239,224],{"class":174},[160,241,242],{"class":170}," String",[160,244,245],{"class":174},")",[160,247,248],{"class":174}," ->",[160,250,251],{"class":170}," Result",[160,253,254],{"class":174},"\u003C(),",[160,256,242],{"class":170},[160,258,259],{"class":174},">",[160,261,262],{"class":174}," {\n",[160,264,266,269,271,274],{"class":162,"line":265},5,[160,267,268],{"class":196},"    app",[160,270,149],{"class":174},[160,272,273],{"class":214},"keyring",[160,275,276],{"class":174},"()\n",[160,278,280,283],{"class":162,"line":279},6,[160,281,282],{"class":174},"        .",[160,284,285],{"class":196},"store\n",[160,287,289,291,294,296,299,303,305,307,310,313],{"class":162,"line":288},7,[160,290,282],{"class":174},[160,292,293],{"class":214},"set_password",[160,295,218],{"class":174},[160,297,298],{"class":174},"\"",[160,300,302],{"class":301},"sfazB","app.api_token",[160,304,298],{"class":174},[160,306,234],{"class":174},[160,308,309],{"class":174}," &",[160,311,312],{"class":196},"token",[160,314,315],{"class":174},")\n",[160,317,319,321,324,327,330,333,336,338,341],{"class":162,"line":318},8,[160,320,282],{"class":174},[160,322,323],{"class":214},"map_err",[160,325,326],{"class":174},"(|",[160,328,329],{"class":196},"e",[160,331,332],{"class":174},"|",[160,334,335],{"class":196}," e",[160,337,149],{"class":174},[160,339,340],{"class":214},"to_string",[160,342,343],{"class":174},"())\n",[160,345,347],{"class":162,"line":346},9,[160,348,349],{"class":174},"}\n",[122,351,352,355,356,224],{},[126,353,354],{},"app.keyring()"," returns ",[126,357,358],{},"&KeyringPlugin",[360,361,362,378],"table",{},[363,364,365],"thead",{},[366,367,368,372,375],"tr",{},[369,370,371],"th",{},"Field",[369,373,374],{},"Type",[369,376,377],{},"What",[379,380,381,397],"tbody",{},[366,382,383,389,394],{},[384,385,386],"td",{},[126,387,388],{},"store",[384,390,391],{},[126,392,393],{},"Arc\u003CKeyringStore>",[384,395,396],{},"OS store access for the plugin's service name.",[366,398,399,404,409],{},[384,400,401],{},[126,402,403],{},"sessions",[384,405,406],{},[126,407,408],{},"SessionRegistry",[384,410,411,412,415],{},"Session paths loaded with ",[126,413,414],{},"initialize"," (insert \u002F remove \u002F contains).",[417,418,420],"h2",{"id":419},"keyringstore",[126,421,422],{},"KeyringStore",[360,424,425,435],{},[363,426,427],{},[366,428,429,432],{},[369,430,431],{},"Method",[369,433,434],{},"Does",[379,436,437,447,457,475,488,501,514,528,541,554,568],{},[366,438,439,444],{},[384,440,441],{},[126,442,443],{},"new(service)",[384,445,446],{},"Handle for one service name. No I\u002FO until the first call.",[366,448,449,454],{},[384,450,451],{},[126,452,453],{},"service()",[384,455,456],{},"The service name.",[366,458,459,468],{},[384,460,461,464,465],{},[126,462,463],{},"set_password(account, &str)"," \u002F ",[126,466,467],{},"get_password(account)",[384,469,470,471,474],{},"UTF-8 secret; ",[126,472,473],{},"Ok(None)"," if missing.",[366,476,477,485],{},[384,478,479,464,482],{},[126,480,481],{},"set_bytes(account, &[u8])",[126,483,484],{},"get_bytes(account)",[384,486,487],{},"Bytes, stored as Base64 text.",[366,489,490,495],{},[384,491,492],{},[126,493,494],{},"delete(account)",[384,496,497,498,149],{},"Deletes; a missing entry is ",[126,499,500],{},"Ok(())",[366,502,503,508],{},[384,504,505],{},[126,506,507],{},"exists_nonempty(account)",[384,509,510,513],{},[126,511,512],{},"true"," if the secret is not empty after trimming.",[366,515,516,521],{},[384,517,518],{},[126,519,520],{},"account_store_key(session, client, key)",[384,522,523,524,527],{},"Account of a session store record (",[126,525,526],{},"kp:v1:…:st:…",").",[366,529,530,535],{},[384,531,532],{},[126,533,534],{},"account_vault_record(session, client, vault, record)",[384,536,537,538,527],{},"Account of a vault record (",[126,539,540],{},"kp:v1:…:v:…",[366,542,543,548],{},[384,544,545],{},[126,546,547],{},"account_raw(session, client, suffix)",[384,549,550,551,527],{},"Account for a free-form key under a session and client (",[126,552,553],{},"kp:v1:…:x:…",[366,555,556,561],{},[384,557,558],{},[126,559,560],{},"with_store(store)",[384,562,563,564,567],{},"Use another ",[126,565,566],{},"keyring-core"," store for this handle.",[366,569,570,578],{},[384,571,572,129,575],{},[126,573,574],{},"availability()",[126,576,577],{},"*_for_background",[384,579,580,581,149],{},"Locked-device helpers, see ",[143,582,584],{"href":583},"#locked-device-and-background-reads","below",[122,586,587,588,595],{},"Rust code is not limited by the ",[143,589,591,594],{"href":590},"\u002Fguides\u002Fpasswords#reserved-accounts",[126,592,593],{},"kp:"," guard",": it can read and\nwrite any account, including the session records.",[597,598,600],"h3",{"id":599},"calls-block","Calls block",[122,602,603,605],{},[126,604,422],{}," methods block: macOS can show a Keychain prompt, Linux talks to the Secret Service over\nD-Bus and may wait for an unlock prompt. In async commands, run them on a blocking thread:",[151,607,609],{"className":153,"code":608,"language":155,"meta":156,"style":156},"#[tauri::command]\nasync fn read_token(app: tauri::AppHandle) -> Result\u003COption\u003CString>, String> {\n    tauri::async_runtime::spawn_blocking(move || app.keyring().store.get_password(\"app.api_token\"))\n        .await\n        .map_err(|e| e.to_string())?\n        .map_err(|e| e.to_string())\n}\n",[126,610,611,623,672,723,731,752,772],{"__ignoreMap":156},[160,612,613,615,617,619,621],{"class":162,"line":163},[160,614,193],{"class":174},[160,616,197],{"class":196},[160,618,175],{"class":174},[160,620,202],{"class":196},[160,622,205],{"class":174},[160,624,625,628,631,634,636,638,640,642,644,646,648,650,652,655,658,660,663,666,668,670],{"class":162,"line":183},[160,626,627],{"class":166},"async",[160,629,630],{"class":166}," fn",[160,632,633],{"class":214}," read_token",[160,635,218],{"class":174},[160,637,221],{"class":196},[160,639,224],{"class":174},[160,641,227],{"class":170},[160,643,175],{"class":174},[160,645,132],{"class":170},[160,647,245],{"class":174},[160,649,248],{"class":174},[160,651,251],{"class":170},[160,653,654],{"class":174},"\u003C",[160,656,657],{"class":170},"Option",[160,659,654],{"class":174},[160,661,662],{"class":170},"String",[160,664,665],{"class":174},">,",[160,667,242],{"class":170},[160,669,259],{"class":174},[160,671,262],{"class":174},[160,673,674,677,679,682,684,687,689,692,695,698,700,702,705,707,709,712,714,716,718,720],{"class":162,"line":190},[160,675,676],{"class":170},"    tauri",[160,678,175],{"class":174},[160,680,681],{"class":170},"async_runtime",[160,683,175],{"class":174},[160,685,686],{"class":214},"spawn_blocking",[160,688,218],{"class":174},[160,690,691],{"class":166},"move",[160,693,694],{"class":174}," ||",[160,696,697],{"class":196}," app",[160,699,149],{"class":174},[160,701,273],{"class":214},[160,703,704],{"class":174},"().",[160,706,388],{"class":196},[160,708,149],{"class":174},[160,710,711],{"class":214},"get_password",[160,713,218],{"class":174},[160,715,298],{"class":174},[160,717,302],{"class":301},[160,719,298],{"class":174},[160,721,722],{"class":174},"))\n",[160,724,725,727],{"class":162,"line":208},[160,726,282],{"class":174},[160,728,730],{"class":729},"s7zQu","await\n",[160,732,733,735,737,739,741,743,745,747,749],{"class":162,"line":265},[160,734,282],{"class":174},[160,736,323],{"class":214},[160,738,326],{"class":174},[160,740,329],{"class":196},[160,742,332],{"class":174},[160,744,335],{"class":196},[160,746,149],{"class":174},[160,748,340],{"class":214},[160,750,751],{"class":174},"())?\n",[160,753,754,756,758,760,762,764,766,768,770],{"class":162,"line":279},[160,755,282],{"class":174},[160,757,323],{"class":214},[160,759,326],{"class":174},[160,761,329],{"class":196},[160,763,332],{"class":174},[160,765,335],{"class":196},[160,767,149],{"class":174},[160,769,340],{"class":214},[160,771,343],{"class":174},[160,773,774],{"class":162,"line":288},[160,775,349],{"class":174},[122,777,778],{},"The plugin's own commands do this already.",[597,780,782],{"id":781},"session-records-from-rust","Session records from Rust",[122,784,785],{},"The same hashing as the IPC store commands, so JavaScript sees what Rust writes:",[151,787,789],{"className":153,"code":788,"language":155,"meta":156,"style":156},"use tauri_plugin_keyring_store::{BytesDto, KeyringExt};\n\nlet kr = app.keyring();\nlet client = BytesDto::Text(\"desktop\".into());\nlet account = kr.store.account_store_key(\"\u002Fapp\u002Fsecrets\", &client, \"prefs\");\nkr.store.set_bytes(&account, b\"{}\")?;\n\u002F\u002F JS: (await (await KeyringSession.load(\"\u002Fapp\u002Fsecrets\", \"\")).loadClient(\"desktop\")).getStore().get(\"prefs\")\n",[126,790,791,811,815,836,870,920,951],{"__ignoreMap":156},[160,792,793,795,797,800,803,805,808],{"class":162,"line":163},[160,794,167],{"class":166},[160,796,171],{"class":170},[160,798,799],{"class":174},"::{",[160,801,802],{"class":170},"BytesDto",[160,804,234],{"class":174},[160,806,807],{"class":170}," KeyringExt",[160,809,810],{"class":174},"};\n",[160,812,813],{"class":162,"line":183},[160,814,187],{"emptyLinePlaceholder":186},[160,816,817,821,824,827,829,831,833],{"class":162,"line":190},[160,818,820],{"class":819},"spNyl","let",[160,822,823],{"class":196}," kr ",[160,825,826],{"class":174},"=",[160,828,697],{"class":196},[160,830,149],{"class":174},[160,832,273],{"class":214},[160,834,835],{"class":174},"();\n",[160,837,838,840,843,845,848,850,853,855,857,860,862,864,867],{"class":162,"line":208},[160,839,820],{"class":819},[160,841,842],{"class":196}," client ",[160,844,826],{"class":174},[160,846,847],{"class":170}," BytesDto",[160,849,175],{"class":174},[160,851,852],{"class":214},"Text",[160,854,218],{"class":174},[160,856,298],{"class":174},[160,858,859],{"class":301},"desktop",[160,861,298],{"class":174},[160,863,149],{"class":174},[160,865,866],{"class":214},"into",[160,868,869],{"class":174},"());\n",[160,871,872,874,877,879,882,884,886,888,891,893,895,898,900,902,904,907,909,912,915,917],{"class":162,"line":265},[160,873,820],{"class":819},[160,875,876],{"class":196}," account ",[160,878,826],{"class":174},[160,880,881],{"class":196}," kr",[160,883,149],{"class":174},[160,885,388],{"class":196},[160,887,149],{"class":174},[160,889,890],{"class":214},"account_store_key",[160,892,218],{"class":174},[160,894,298],{"class":174},[160,896,897],{"class":301},"\u002Fapp\u002Fsecrets",[160,899,298],{"class":174},[160,901,234],{"class":174},[160,903,309],{"class":174},[160,905,906],{"class":196},"client",[160,908,234],{"class":174},[160,910,911],{"class":174}," \"",[160,913,914],{"class":301},"prefs",[160,916,298],{"class":174},[160,918,919],{"class":174},");\n",[160,921,922,925,927,929,931,934,937,940,942,945,948],{"class":162,"line":279},[160,923,924],{"class":196},"kr",[160,926,149],{"class":174},[160,928,388],{"class":196},[160,930,149],{"class":174},[160,932,933],{"class":214},"set_bytes",[160,935,936],{"class":174},"(&",[160,938,939],{"class":196},"account",[160,941,234],{"class":174},[160,943,944],{"class":301}," b",[160,946,947],{"class":174},"\"{}\"",[160,949,950],{"class":174},")?;\n",[160,952,953],{"class":162,"line":288},[160,954,956],{"class":955},"sHwdD","\u002F\u002F JS: (await (await KeyringSession.load(\"\u002Fapp\u002Fsecrets\", \"\")).loadClient(\"desktop\")).getStore().get(\"prefs\")\n",[417,958,960],{"id":959},"service-name","Service name",[122,962,963,966,967,970],{},[126,964,965],{},"init()"," uses the app ",[126,968,969],{},"identifier",". To set it:",[151,972,974],{"className":153,"code":973,"language":155,"meta":156,"style":156},"tauri_plugin_keyring_store::Builder::new()\n    .service(\"com.example.myapp.keyring\")\n    .build()\n",[126,975,976,993,1012],{"__ignoreMap":156},[160,977,978,981,983,986,988,991],{"class":162,"line":163},[160,979,980],{"class":170},"tauri_plugin_keyring_store",[160,982,175],{"class":174},[160,984,985],{"class":170},"Builder",[160,987,175],{"class":174},[160,989,990],{"class":214},"new",[160,992,276],{"class":174},[160,994,995,998,1001,1003,1005,1008,1010],{"class":162,"line":183},[160,996,997],{"class":174},"    .",[160,999,1000],{"class":214},"service",[160,1002,218],{"class":174},[160,1004,298],{"class":174},[160,1006,1007],{"class":301},"com.example.myapp.keyring",[160,1009,298],{"class":174},[160,1011,315],{"class":174},[160,1013,1014,1016,1019],{"class":162,"line":190},[160,1015,997],{"class":174},[160,1017,1018],{"class":214},"build",[160,1020,276],{"class":174},[122,1022,1023,1024,1027],{},"A standalone ",[126,1025,1026],{},"KeyringStore::new(\"…\")"," can use any other service, e.g. to share entries with another app\nor tool that uses the same service and account names.",[417,1029,1031],{"id":1030},"custom-credential-store","Custom credential store",[122,1033,1034,1037,1038,1044,1045,1047],{},[126,1035,1036],{},"with_store"," points one handle at any ",[143,1039,1042],{"href":1040,"rel":1041},"https:\u002F\u002Fdocs.rs\u002Fkeyring-core",[147],[126,1043,566],{}," store instead of the\nprocess-wide default for the platform. The plugin registered with ",[126,1046,965],{}," keeps the default store.",[151,1049,1053],{"className":1050,"code":1051,"language":1052,"meta":156,"style":156},"language-rust,ignore shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use tauri_plugin_keyring_store::KeyringStore;\n\nlet store = KeyringStore::new(\"com.example.app\")\n    .with_store(linux_keyutils_keyring_store::Store::new()?);\nstore.set_password(\"app.token\", \"secret\")?;\n","rust,ignore",[126,1054,1055,1060,1064,1069,1074],{"__ignoreMap":156},[160,1056,1057],{"class":162,"line":163},[160,1058,1059],{},"use tauri_plugin_keyring_store::KeyringStore;\n",[160,1061,1062],{"class":162,"line":183},[160,1063,187],{"emptyLinePlaceholder":186},[160,1065,1066],{"class":162,"line":190},[160,1067,1068],{},"let store = KeyringStore::new(\"com.example.app\")\n",[160,1070,1071],{"class":162,"line":208},[160,1072,1073],{},"    .with_store(linux_keyutils_keyring_store::Store::new()?);\n",[160,1075,1076],{"class":162,"line":265},[160,1077,1078],{},"store.set_password(\"app.token\", \"secret\")?;\n",[122,1080,1081,1082,1089,1090,527],{},"Useful on Linux servers without a Secret Service (",[143,1083,1086],{"href":1084,"rel":1085},"https:\u002F\u002Fcrates.io\u002Fcrates\u002Flinux-keyutils-keyring-store",[147],[126,1087,1088],{},"linux-keyutils-keyring-store","\nnever prompts, but keeps secrets only for the login session) and in tests (",[126,1091,1092],{},"keyring_core::mock::Store",[417,1094,1096],{"id":1095},"locked-device-and-background-reads","Locked device and background reads",[122,1098,1099,1100,149],{},"On iOS the keychain can be unreadable while the device is locked, see ",[143,1101,109],{"href":110},[360,1103,1104,1114],{},[363,1105,1106],{},[366,1107,1108,1111],{},[369,1109,1110],{},"Call",[369,1112,1113],{},"When locked",[379,1115,1116,1133,1147,1159],{},[366,1117,1118,1128],{},[384,1119,1120,129,1122,129,1125],{},[126,1121,711],{},[126,1123,1124],{},"get_bytes",[126,1126,1127],{},"exists_nonempty",[384,1129,1130],{},[126,1131,1132],{},"Err(Error::KeychainLocked)",[366,1134,1135,1143],{},[384,1136,1137,129,1140],{},[126,1138,1139],{},"get_password_for_background",[126,1141,1142],{},"get_bytes_for_background",[384,1144,1145],{},[126,1146,473],{},[366,1148,1149,1154],{},[384,1150,1151],{},[126,1152,1153],{},"exists_nonempty_for_background",[384,1155,1156],{},[126,1157,1158],{},"Ok(false)",[366,1160,1161,1165],{},[384,1162,1163],{},[126,1164,574],{},[384,1166,1167],{},[126,1168,1169],{},"KeyringAvailability::Locked",[151,1171,1173],{"className":153,"code":1172,"language":155,"meta":156,"style":156},"use tauri_plugin_keyring_store::{Error, KeyringAvailability, KeyringStore};\n\nfn sync(store: &KeyringStore) -> Result\u003C(), Error> {\n    if store.availability() == KeyringAvailability::Locked {\n        return Ok(()); \u002F\u002F try again later\n    }\n    let token = store.get_password_for_background(\"oauth-token\")?;\n    Ok(())\n}\n",[126,1174,1175,1198,1202,1234,1262,1276,1281,1308,1316],{"__ignoreMap":156},[160,1176,1177,1179,1181,1183,1186,1188,1191,1193,1196],{"class":162,"line":163},[160,1178,167],{"class":166},[160,1180,171],{"class":170},[160,1182,799],{"class":174},[160,1184,1185],{"class":170},"Error",[160,1187,234],{"class":174},[160,1189,1190],{"class":170}," KeyringAvailability",[160,1192,234],{"class":174},[160,1194,1195],{"class":170}," KeyringStore",[160,1197,810],{"class":174},[160,1199,1200],{"class":162,"line":183},[160,1201,187],{"emptyLinePlaceholder":186},[160,1203,1204,1206,1209,1211,1213,1215,1217,1219,1221,1223,1225,1227,1230,1232],{"class":162,"line":190},[160,1205,211],{"class":166},[160,1207,1208],{"class":214}," sync",[160,1210,218],{"class":174},[160,1212,388],{"class":196},[160,1214,224],{"class":174},[160,1216,309],{"class":174},[160,1218,422],{"class":170},[160,1220,245],{"class":174},[160,1222,248],{"class":174},[160,1224,251],{"class":170},[160,1226,254],{"class":174},[160,1228,1229],{"class":170}," Error",[160,1231,259],{"class":174},[160,1233,262],{"class":174},[160,1235,1236,1239,1242,1244,1247,1250,1253,1255,1257,1260],{"class":162,"line":208},[160,1237,1238],{"class":729},"    if",[160,1240,1241],{"class":196}," store",[160,1243,149],{"class":174},[160,1245,1246],{"class":214},"availability",[160,1248,1249],{"class":174},"()",[160,1251,1252],{"class":174}," ==",[160,1254,1190],{"class":170},[160,1256,175],{"class":174},[160,1258,1259],{"class":170},"Locked",[160,1261,262],{"class":174},[160,1263,1264,1267,1270,1273],{"class":162,"line":265},[160,1265,1266],{"class":729},"        return",[160,1268,1269],{"class":170}," Ok",[160,1271,1272],{"class":174},"(());",[160,1274,1275],{"class":955}," \u002F\u002F try again later\n",[160,1277,1278],{"class":162,"line":279},[160,1279,1280],{"class":174},"    }\n",[160,1282,1283,1286,1289,1291,1293,1295,1297,1299,1301,1304,1306],{"class":162,"line":288},[160,1284,1285],{"class":819},"    let",[160,1287,1288],{"class":196}," token ",[160,1290,826],{"class":174},[160,1292,1241],{"class":196},[160,1294,149],{"class":174},[160,1296,1139],{"class":214},[160,1298,218],{"class":174},[160,1300,298],{"class":174},[160,1302,1303],{"class":301},"oauth-token",[160,1305,298],{"class":174},[160,1307,950],{"class":174},[160,1309,1310,1313],{"class":162,"line":318},[160,1311,1312],{"class":170},"    Ok",[160,1314,1315],{"class":174},"(())\n",[160,1317,1318],{"class":162,"line":346},[160,1319,349],{"class":174},[122,1321,1322,1323,1325,1326,1329,1330,149],{},"On other platforms ",[126,1324,574],{}," always returns ",[126,1327,1328],{},"Available",". These helpers have no IPC command;\nover IPC a locked keychain arrives as the error string ",[126,1331,1332],{},"keychain locked or protected data unavailable",[417,1334,1336],{"id":1335},"errors","Errors",[122,1338,1339,1342,1343,1346],{},[126,1340,1341],{},"tauri_plugin_keyring_store::Error"," is ",[126,1344,1345],{},"#[non_exhaustive]"," and serializes to a plain string over IPC.\nMessages never contain secrets, key material or mnemonic words.",[360,1348,1349,1359],{},[363,1350,1351],{},[366,1352,1353,1356],{},[369,1354,1355],{},"Variant",[369,1357,1358],{},"Message",[379,1360,1361,1373,1385,1398,1409,1422,1435,1447],{},[366,1362,1363,1368],{},[384,1364,1365],{},[126,1366,1367],{},"SessionNotInitialized(path)",[384,1369,1370],{},[126,1371,1372],{},"session not initialized: \u003Cpath>",[366,1374,1375,1380],{},[384,1376,1377],{},[126,1378,1379],{},"NoEntry",[384,1381,1382],{},[126,1383,1384],{},"credential entry not found",[366,1386,1387,1392],{},[384,1388,1389],{},[126,1390,1391],{},"Init(reason)",[384,1393,1394,1397],{},[126,1395,1396],{},"plugin initialization failed: \u003Creason>",": the OS store could not start.",[366,1399,1400,1405],{},[384,1401,1402],{},[126,1403,1404],{},"KeychainLocked",[384,1406,1407],{},[126,1408,1332],{},[366,1410,1411,1416],{},[384,1412,1413],{},[126,1414,1415],{},"Keyring(reason)",[384,1417,1418,1421],{},[126,1419,1420],{},"keyring error: \u003Creason>",": any other OS store error.",[366,1423,1424,1429],{},[384,1425,1426],{},[126,1427,1428],{},"Encoding(reason)",[384,1430,1431,1434],{},[126,1432,1433],{},"encoding error: \u003Creason>",": bad Base64 in an entry, bad backup format.",[366,1436,1437,1442],{},[384,1438,1439],{},[126,1440,1441],{},"Crypto(reason)",[384,1443,1444],{},[126,1445,1446],{},"crypto procedure error: \u003Creason>",[366,1448,1449,1454],{},[384,1450,1451],{},[126,1452,1453],{},"Naming(reason)",[384,1455,1456,1459],{},[126,1457,1458],{},"naming \u002F validation error: \u003Creason>",": account rules, item limits, naming helpers.",[122,1461,1462],{},"When the OS store fails to start (e.g. no D-Bus session yet), the failure is not cached: the next\ncall after a 2-second pause tries again.",[1464,1465,1466],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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 .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}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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}",{"title":156,"searchDepth":183,"depth":190,"links":1468},[1469,1473,1474,1475,1476],{"id":419,"depth":183,"text":422,"children":1470},[1471,1472],{"id":599,"depth":190,"text":600},{"id":781,"depth":190,"text":782},{"id":959,"depth":183,"text":960},{"id":1030,"depth":183,"text":1031},{"id":1095,"depth":183,"text":1096},{"id":1335,"depth":183,"text":1336},"Use KeyringStore from your own commands, set the service name, plug in another keyring-core store, and read secrets from background tasks.","md",null,{},{"title":46,"description":1477},"YU18WXLrARramygMc4Zqjrc0KREaj1M-RU9oUHRBGZ0",[1484,1486],{"title":42,"path":43,"stem":44,"description":1485,"children":-1},"Read and write UTF-8 secrets by account name in bulk, name accounts, and export or import backups.",{"title":50,"path":51,"stem":52,"description":1487,"children":-1},"What protects the secrets, what the webview can reach, and how to handle passwords, mnemonics and backups.",1794215488502]