Struct Id
#[repr(transparent)]pub struct Id([c_char; 4]);Expand description
4 letter ASCII DLT Identifier.
Tuple Fields§
§0: [c_char; 4]Implementations§
§impl Id
impl Id
const MAX_LEN: usize = 4usize
pub const fn new() -> Self
const fn from_byte_array(buf: [u8; 4]) -> Self
pub fn from_bytes_opt(s: &[u8]) -> Option<Self>
pub fn from_str_opt(s: &str) -> Option<Self>
pub const fn len(self) -> usize
pub const fn is_empty(self) -> bool
fn as_slice(&self) -> &[c_char]
fn as_bytes(&self) -> &[u8]
pub fn as_str(&self) -> &str
unsafe fn as_mut_bytes(&mut self) -> &mut [u8; 4]
Trait Implementations§
§impl<'de> Deserialize<'de> for Id
impl<'de> Deserialize<'de> for Id
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Write for Id
impl Write for Id
impl Copy for Id
Auto Trait Implementations§
impl Freeze for Id
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnwindSafe for Id
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