mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-22 17:10:53 +02:00
fix(nfc): adapt backend invoke to frontend
This commit is contained in:
@@ -44,7 +44,7 @@ impl<R: Runtime> Nfc<R> {
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn scan(&self, payload: ScanRequest) -> crate::Result<ScanResponse> {
|
||||
pub fn scan(&self, payload: ScanRequest) -> crate::Result<NfcTag> {
|
||||
self.0
|
||||
.run_mobile_plugin("scan", payload)
|
||||
.map_err(Into::into)
|
||||
|
||||
@@ -43,16 +43,11 @@ pub struct NfcTagRecord {
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct NfcTag {
|
||||
pub id: String,
|
||||
pub kind: String,
|
||||
pub id: Vec<u8>,
|
||||
pub kind: Vec<String>,
|
||||
pub records: Vec<NfcTagRecord>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ScanResponse {
|
||||
pub tag: NfcTag,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize)]
|
||||
pub struct UriFilter {
|
||||
scheme: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user