pub struct BridgeProfileSpec {
pub id: Symbol,
pub parts: Vec<ProfilePartRule>,
pub one_or_more_of: Vec<Symbol>,
}Expand description
Registered BRIDGE profile.
Fields§
§id: SymbolProfile id.
parts: Vec<ProfilePartRule>Ordered part-kind rules.
one_or_more_of: Vec<Symbol>Alternative part kinds accepted one-or-more times in any order.
Implementations§
Source§impl BridgeProfileSpec
impl BridgeProfileSpec
Sourcepub fn new(id: Symbol, parts: Vec<ProfilePartRule>) -> Self
pub fn new(id: Symbol, parts: Vec<ProfilePartRule>) -> Self
Builds a profile spec.
Sourcepub fn one_or_more_of(id: Symbol, kinds: Vec<Symbol>) -> Self
pub fn one_or_more_of(id: Symbol, kinds: Vec<Symbol>) -> Self
Builds a profile spec accepting one or more of the listed part kinds.
Sourcepub fn matches_packet(&self, packet: &BridgePacket) -> bool
pub fn matches_packet(&self, packet: &BridgePacket) -> bool
Returns true when packet matches this ordered profile.
Trait Implementations§
Source§impl Clone for BridgeProfileSpec
impl Clone for BridgeProfileSpec
Source§fn clone(&self) -> BridgeProfileSpec
fn clone(&self) -> BridgeProfileSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BridgeProfileSpec
impl Debug for BridgeProfileSpec
impl Eq for BridgeProfileSpec
Source§impl PartialEq for BridgeProfileSpec
impl PartialEq for BridgeProfileSpec
impl StructuralPartialEq for BridgeProfileSpec
Auto Trait Implementations§
impl Freeze for BridgeProfileSpec
impl RefUnwindSafe for BridgeProfileSpec
impl Send for BridgeProfileSpec
impl Sync for BridgeProfileSpec
impl Unpin for BridgeProfileSpec
impl UnsafeUnpin for BridgeProfileSpec
impl UnwindSafe for BridgeProfileSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more