#[non_exhaustive]pub struct MuxOptions {
pub answer_cld: bool,
pub deaf: HashSet<u8>,
pub refuse: HashSet<u8>,
pub lost_first_frames: usize,
}Expand description
How the multiplexer behaves; the default answers every request.
use serialplugin_testing::MuxOptions;
let options = MuxOptions::default().refuse([4]).lost_first_frames(1);
assert!(options.answer_cld && options.refuse.contains(&4));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.answer_cld: boolAnswer CLD and leave the multiplexer; off, CLD gets no answer.
deaf: HashSet<u8>DLCIs whose SABM gets no answer.
refuse: HashSet<u8>DLCIs whose SABM is refused (DM).
lost_first_frames: usizeFrames ignored right after the AT+CMUX OK, as a Quectel M26 does when the host
is too quick.
Implementations§
Source§impl MuxOptions
impl MuxOptions
Sourcepub fn answer_cld(self, on: bool) -> Self
pub fn answer_cld(self, on: bool) -> Self
Set answer_cld.
Sourcepub fn deaf(self, dlcis: impl IntoIterator<Item = u8>) -> Self
pub fn deaf(self, dlcis: impl IntoIterator<Item = u8>) -> Self
Add to deaf.
Sourcepub fn refuse(self, dlcis: impl IntoIterator<Item = u8>) -> Self
pub fn refuse(self, dlcis: impl IntoIterator<Item = u8>) -> Self
Add to refuse.
Sourcepub fn lost_first_frames(self, n: usize) -> Self
pub fn lost_first_frames(self, n: usize) -> Self
Set lost_first_frames.
Trait Implementations§
Source§impl Clone for MuxOptions
impl Clone for MuxOptions
Source§impl Debug for MuxOptions
impl Debug for MuxOptions
Auto Trait Implementations§
impl Forget for MuxOptions
impl Freeze for MuxOptions
impl Move for MuxOptions
impl RefUnwindSafe for MuxOptions
impl Send for MuxOptions
impl Sync for MuxOptions
impl Unpin for MuxOptions
impl UnsafeUnpin for MuxOptions
impl UnwindSafe for MuxOptions
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