#[non_exhaustive]pub enum Subframe<'a> {
Register {
subframe_type: SubframeType,
register: u16,
resolution: Resolution,
value: Option<Value>,
},
Error {
subframe_type: SubframeType,
register: u16,
error_code: u16,
},
Stream {
subframe_type: SubframeType,
channel: u16,
data: &'a [u8],
},
}Expand description
A single parsed subframe from a multiplex protocol frame.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Register
A register read, write, or response subframe.
Fields
§
subframe_type: SubframeTypeThe type of operation
§
resolution: ResolutionThe resolution of the value
Error
An error subframe.
Fields
§
subframe_type: SubframeTypeThe type of error (WriteError or ReadError)
Stream
A tunneled stream subframe.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Subframe<'a>
impl<'a> RefUnwindSafe for Subframe<'a>
impl<'a> Send for Subframe<'a>
impl<'a> Sync for Subframe<'a>
impl<'a> Unpin for Subframe<'a>
impl<'a> UnsafeUnpin for Subframe<'a>
impl<'a> UnwindSafe for Subframe<'a>
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