Be aware: Foundation will NEVER ask for your seed words, device PIN, or call you unexpectedly. If anyone does, it's a scam.

Struct

ScanQrMatchedRule

pub struct ScanQrMatchedRule {
    pub rule_id: String,
    pub priority: QrPriority,
    pub sub_rule_id: String,
}
Expand description

Options for the QR Scanner navigation request.

Example with a left back arrow and a simple message:

ⓘ
let options = ScanQrOptions::default()
    .with_start_location(Location::External)
    .with_allowed_locations(AllowedLocations::specific(&[Location::External]))
    .with_allowed_extensions(AllowedExtensions::specific(&["bin"]));

A single rule (and the first sub-rule that triggered it) that matched a scanned QR code.

Fields

rule_id: Stringpriority: QrPrioritysub_rule_id: String

The ID of the first sub-rule that matched — used for dispatch hints without bloating the message with every matching sub-rule.

Trait Implementations

impl Archive for ScanQrMatchedRule
where String: Archive, QrPriority: Archive,

const COPY_OPTIMIZATION: CopyOptimization<Self>

An optimization flag that allows the bytes of this type to be copied directly to a writer instead of calling serialize. Read more

type Archived = ArchivedScanQrMatchedRule

The archived representation of this type. Read more

type Resolver = ScanQrMatchedRuleResolver

The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type.

fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)

Creates the archived version of this value at the given position and writes it to the given output. Read more

impl Clone for ScanQrMatchedRule

fn clone(&self) -> ScanQrMatchedRule

Returns a duplicate of the value. Read more
1.0.0

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Debug for ScanQrMatchedRule

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

impl<__D: Fallible + ?Sized> Deserialize<ScanQrMatchedRule, __D> for Archived<ScanQrMatchedRule>
where String: Archive, <String as Archive>::Archived: Deserialize<String, __D>, QrPriority: Archive, <QrPriority as Archive>::Archived: Deserialize<QrPriority, __D>,

fn deserialize( &self, deserializer: &mut __D, ) -> Result<ScanQrMatchedRule, <__D as Fallible>::Error>

Deserializes using the given deserializer

impl<__S: Fallible + ?Sized> Serialize<__S> for ScanQrMatchedRule
where String: Serialize<__S>, QrPriority: Serialize<__S>,

fn serialize( &self, serializer: &mut __S, ) -> Result<<Self as Archive>::Resolver, <__S as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.

Auto Trait Implementations

impl Freeze for ScanQrMatchedRule

impl RefUnwindSafe for ScanQrMatchedRule

impl Send for ScanQrMatchedRule

impl Sync for ScanQrMatchedRule

impl Unpin for ScanQrMatchedRule

impl UnsafeUnpin for ScanQrMatchedRule

impl UnwindSafe for ScanQrMatchedRule