pub struct CommandMatchBuilder { /* private fields */ }Expand description
A builder that can be used to generate CommandMatch patterns.
Usage:
Match to any admin command with cid == 10
CommandMatchBuilder::new().match_cdw0(
Cdw0::new().with_cid(10).into(),
Cdw0::new().with_cid(u16::MAX).into(), // Mask all the cid bits for an exact match on cid(10)
)
.build();Match to any admin command with opcode == 0x01
CommandMatchBuilder::new().match_cdw0_opcode(0x01).build();Implementations§
Source§impl CommandMatchBuilder
impl CommandMatchBuilder
Sourcepub fn match_cdw0_opcode(&mut self, opcode: u8) -> &mut Self
pub fn match_cdw0_opcode(&mut self, opcode: u8) -> &mut Self
Configure to match to an opcode. See struct docs for usage
Sourcepub fn match_cdw0(&mut self, cdw0: u32, mask: u32) -> &mut Self
pub fn match_cdw0(&mut self, cdw0: u32, mask: u32) -> &mut Self
Configure to match a cdw0 pattern. Mask specifies which bits to match on. See struct docs for usage
Sourcepub fn match_cdw10(&mut self, cdw10: u32, mask: u32) -> &mut Self
pub fn match_cdw10(&mut self, cdw10: u32, mask: u32) -> &mut Self
Configure to match a cdw10 pattern. Mask specifies which bits to match on. See struct docs for usage
Auto Trait Implementations§
impl Freeze for CommandMatchBuilder
impl RefUnwindSafe for CommandMatchBuilder
impl Send for CommandMatchBuilder
impl Sync for CommandMatchBuilder
impl Unpin for CommandMatchBuilder
impl UnwindSafe for CommandMatchBuilder
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