pub struct NestedView;
Expand description
Use this as a marker type for using this layout as a nested field within another layout.
§Example
use binary_layout::prelude::*;
binary_layout!(icmp_header, BigEndian, {
packet_type: u8,
code: u8,
checksum: u16,
rest_of_header: [u8; 4],
});
binary_layout!(icmp_packet, BigEndian, {
header: icmp_header::NestedView,
data_section: [u8], // open ended byte array, matches until the end of the packet
});
Auto Trait Implementations§
impl Freeze for NestedView
impl RefUnwindSafe for NestedView
impl Send for NestedView
impl Sync for NestedView
impl Unpin for NestedView
impl UnwindSafe for NestedView
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