pub struct Addr {
pub val: u32,
pub len: u8,
pub extra_bit: bool,
}
Fields§
§val: u32
§len: u8
§extra_bit: bool
Implementations§
Source§impl Addr
impl Addr
pub fn new(val: u16, len: u8) -> Addr
pub fn new_with_extra_bit(val: u32, len: u8, extra_bit: bool) -> Addr
pub fn read(buf: &mut Bytes, len: u8) -> Result<Addr, TryBufError>
pub fn read_u16(buf: &mut Bytes) -> Result<Addr, TryBufError>
pub fn read_u24(buf: &mut Bytes) -> Result<Addr, TryBufError>
pub fn write(&self, buf: &mut BytesMut)
Trait Implementations§
impl Copy for Addr
impl Eq for Addr
impl StructuralPartialEq for Addr
Auto Trait Implementations§
impl Freeze for Addr
impl RefUnwindSafe for Addr
impl Send for Addr
impl Sync for Addr
impl Unpin for Addr
impl UnwindSafe for Addr
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