[−][src]Struct xaynet::mask::MaskObjectBuffer
A buffer for serialized mask objects.
Implementations
impl<T: AsRef<[u8]>> MaskObjectBuffer<T>
[src]
pub fn new(bytes: T) -> Result<Self, DecodeError>
[src]
Creates a new buffer from bytes
.
Errors
Fails if the bytes
don't conform to the required buffer length for mask objects.
pub fn new_unchecked(bytes: T) -> Self
[src]
Creates a new buffer from bytes
.
pub fn check_buffer_length(&self) -> Result<(), DecodeError>
[src]
Checks if this buffer conforms to the required buffer length for mask objects.
Errors
Fails if the buffer is too small.
pub fn len(&self) -> usize
[src]
Gets the expected number of bytes of this buffer wrt to the masking configuration.
Panics
Panics if the serialized masking configuration is invalid.
pub fn numbers(&self) -> usize
[src]
Gets the number of serialized mask object elements.
Panics
May panic if this buffer is unchecked.
Panics if the number can't be represented as usize on targets smaller than 32 bits.
pub fn config(&self) -> &[u8]
[src]
pub fn data(&self) -> &[u8]
[src]
impl<T: AsRef<[u8]> + AsMut<[u8]>> MaskObjectBuffer<T>
[src]
pub fn set_numbers(&mut self, value: u32)
[src]
pub fn config_mut(&mut self) -> &mut [u8]
[src]
pub fn data_mut(&mut self) -> &mut [u8]
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for MaskObjectBuffer<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for MaskObjectBuffer<T> where
T: Send,
T: Send,
impl<T> Sync for MaskObjectBuffer<T> where
T: Sync,
T: Sync,
impl<T> Unpin for MaskObjectBuffer<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for MaskObjectBuffer<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,