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: StringThe 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 ScanQrMatchedRulewhere
String: Archive,
QrPriority: Archive,
impl Archive for ScanQrMatchedRulewhere
String: Archive,
QrPriority: Archive,
const COPY_OPTIMIZATION: CopyOptimization<Self>
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 moretype Archived = ArchivedScanQrMatchedRule
type Archived = ArchivedScanQrMatchedRule
The archived representation of this type. Read more
type Resolver = ScanQrMatchedRuleResolver
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.
impl Clone for ScanQrMatchedRule
impl Clone for ScanQrMatchedRule
fn clone(&self) -> ScanQrMatchedRule
fn clone(&self) -> ScanQrMatchedRule
Returns a duplicate of the value. Read more
1.0.0fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Debug for ScanQrMatchedRule
impl Debug for ScanQrMatchedRule
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>,
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>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<ScanQrMatchedRule, <__D as Fallible>::Error>
Deserializes using the given deserializer
impl<__S: Fallible + ?Sized> Serialize<__S> for ScanQrMatchedRulewhere
String: Serialize<__S>,
QrPriority: Serialize<__S>,
impl<__S: Fallible + ?Sized> Serialize<__S> for ScanQrMatchedRulewhere
String: Serialize<__S>,
QrPriority: Serialize<__S>,
fn serialize(
&self,
serializer: &mut __S,
) -> Result<<Self as Archive>::Resolver, <__S as Fallible>::Error>
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.