Struct Masker

Source
pub struct Masker<'w> { /* private fields */ }
Expand description

Struct to pipe data into another writer, while masking the data being written

Implementations§

Source§

impl<'w> Masker<'w>

Source

pub fn new(key: [u8; 4], endpoint: &'w mut dyn BtMut) -> Self

Create a new Masker with the key and the endpoint to be writer to.

Trait Implementations§

Source§

impl<'w> BtMut for Masker<'w>

Source§

fn remaining_mut(&self) -> usize

Source§

unsafe fn advance_mut(&mut self, cnt: usize)

Source§

fn chunk_mut(&mut self) -> &mut [MaybeUninit<u8>]

Source§

fn put_slice(&mut self, src: &[u8]) -> usize

Source§

fn has_remaining_mut(&self) -> bool

Source§

fn put<T>(&mut self, src: &mut T) -> usize
where T: Bt, Self: Sized,

Source§

fn inner_put_slice(&mut self, src: &[u8]) -> usize

Source§

fn put_bytes(&mut self, val: u8, cnt: usize) -> usize

Source§

fn put_bool(&mut self, b: bool) -> usize

Source§

fn put_u8(&mut self, n: u8) -> usize

Source§

fn put_i8(&mut self, n: i8) -> usize

Source§

fn put_u16(&mut self, n: u16) -> usize

Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
Source§

fn put_u16_le(&mut self, n: u16) -> usize

Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
Source§

fn put_u16_ne(&mut self, n: u16) -> usize

Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
Source§

fn put_i16(&mut self, n: i16) -> usize

Writes a signed 16 bit integer to self in big-endian byte order. Read more
Source§

fn put_i16_le(&mut self, n: i16) -> usize

Writes a signed 16 bit integer to self in little-endian byte order. Read more
Source§

fn put_i16_ne(&mut self, n: i16) -> usize

Writes a signed 16 bit integer to self in native-endian byte order. Read more
Source§

fn put_u32(&mut self, n: u32) -> usize

Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
Source§

fn put_u32_le(&mut self, n: u32) -> usize

Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
Source§

fn put_u32_ne(&mut self, n: u32) -> usize

Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
Source§

fn put_i32(&mut self, n: i32) -> usize

Writes a signed 32 bit integer to self in big-endian byte order. Read more
Source§

fn put_i32_le(&mut self, n: i32) -> usize

Writes a signed 32 bit integer to self in little-endian byte order. Read more
Source§

fn put_i32_ne(&mut self, n: i32) -> usize

Writes a signed 32 bit integer to self in native-endian byte order. Read more
Source§

fn put_u64(&mut self, n: u64) -> usize

Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
Source§

fn put_u64_le(&mut self, n: u64) -> usize

Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
Source§

fn put_u64_ne(&mut self, n: u64) -> usize

Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
Source§

fn put_i64(&mut self, n: i64) -> usize

Writes a signed 64 bit integer to self in the big-endian byte order. Read more
Source§

fn put_i64_le(&mut self, n: i64) -> usize

Writes a signed 64 bit integer to self in little-endian byte order. Read more
Source§

fn put_i64_ne(&mut self, n: i64) -> usize

Writes a signed 64 bit integer to self in native-endian byte order. Read more
Source§

fn put_u128(&mut self, n: u128) -> usize

Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
Source§

fn put_u128_le(&mut self, n: u128) -> usize

Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
Source§

fn put_u128_ne(&mut self, n: u128) -> usize

Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
Source§

fn put_i128(&mut self, n: i128) -> usize

Writes a signed 128 bit integer to self in the big-endian byte order. Read more
Source§

fn put_i128_le(&mut self, n: i128) -> usize

Writes a signed 128 bit integer to self in little-endian byte order. Read more
Source§

fn put_i128_ne(&mut self, n: i128) -> usize

Writes a signed 128 bit integer to self in native-endian byte order. Read more
Source§

fn put_uint(&mut self, n: u64, nbytes: usize) -> usize

Writes an unsigned n-byte integer to self in big-endian byte order. Read more
Source§

fn put_uint_le(&mut self, n: u64, nbytes: usize) -> usize

Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
Source§

fn put_uint_ne(&mut self, n: u64, nbytes: usize) -> usize

Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
Source§

fn put_int(&mut self, n: i64, nbytes: usize) -> usize

Writes low nbytes of a signed integer to self in big-endian byte order. Read more
Source§

fn put_int_le(&mut self, n: i64, nbytes: usize) -> usize

Writes low nbytes of a signed integer to self in little-endian byte order. Read more
Source§

fn put_int_ne(&mut self, n: i64, nbytes: usize) -> usize

Writes low nbytes of a signed integer to self in native-endian byte order. Read more
Source§

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to self in big-endian byte order. Read more
Source§

fn put_f32_le(&mut self, n: f32) -> usize

Writes an IEEE754 single-precision (4 bytes) floating point number to self in little-endian byte order. Read more
Source§

fn put_f32_ne(&mut self, n: f32) -> usize

Writes an IEEE754 single-precision (4 bytes) floating point number to self in native-endian byte order. Read more
Source§

fn put_f64(&mut self, n: f64) -> usize

Writes an IEEE754 double-precision (8 bytes) floating point number to self in big-endian byte order. Read more
Source§

fn put_f64_le(&mut self, n: f64) -> usize

Writes an IEEE754 double-precision (8 bytes) floating point number to self in little-endian byte order. Read more
Source§

fn put_f64_ne(&mut self, n: f64) -> usize

Writes an IEEE754 double-precision (8 bytes) floating point number to self in native-endian byte order. Read more

Auto Trait Implementations§

§

impl<'w> Freeze for Masker<'w>

§

impl<'w> !RefUnwindSafe for Masker<'w>

§

impl<'w> !Send for Masker<'w>

§

impl<'w> !Sync for Masker<'w>

§

impl<'w> Unpin for Masker<'w>

§

impl<'w> !UnwindSafe for Masker<'w>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.