pub struct FixedLengthString<'a, const LENGTH: usize> { /* private fields */ }
Expand description
A fixed length string.
Implementations§
Source§impl<'a, const LENGTH: usize> FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> FixedLengthString<'a, LENGTH>
Sourcepub fn new(encoded_string: EncodedString<'a>) -> FixedLengthString<'a, LENGTH>
pub fn new(encoded_string: EncodedString<'a>) -> FixedLengthString<'a, LENGTH>
Creates a new FixedLengthString
.
Sourcepub fn get_encoded(&self) -> &EncodedString<'_>
pub fn get_encoded(&self) -> &EncodedString<'_>
Returns the encoded inner string.
Trait Implementations§
Source§impl<'a, const LENGTH: usize> Clone for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> Clone for FixedLengthString<'a, LENGTH>
Source§fn clone(&self) -> FixedLengthString<'a, LENGTH>
fn clone(&self) -> FixedLengthString<'a, LENGTH>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, const LENGTH: usize> Debug for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> Debug for FixedLengthString<'a, LENGTH>
Source§impl<'a, const LENGTH: usize> Parse<'a> for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> Parse<'a> for FixedLengthString<'a, LENGTH>
Source§fn parse_partial(
reader: &mut ByteReader<'a>,
) -> Result<FixedLengthString<'a, LENGTH>, ParseError>
fn parse_partial( reader: &mut ByteReader<'a>, ) -> Result<FixedLengthString<'a, LENGTH>, ParseError>
Parses a SOME/IP payload type from a given slice of bytes. Read more
Source§impl<'a, const LENGTH: usize> PartialEq for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> PartialEq for FixedLengthString<'a, LENGTH>
Source§fn eq(&self, other: &FixedLengthString<'a, LENGTH>) -> bool
fn eq(&self, other: &FixedLengthString<'a, LENGTH>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<const LENGTH: usize> Serialize for FixedLengthString<'_, LENGTH>
impl<const LENGTH: usize> Serialize for FixedLengthString<'_, LENGTH>
Source§fn required_length(&self) -> usize
fn required_length(&self) -> usize
Returns the number of bytes required to store the serialized version of self.
Source§fn serialize_partial(
&self,
byte_writer: &mut ByteWriter<'_>,
) -> Result<(), SerializeError>
fn serialize_partial( &self, byte_writer: &mut ByteWriter<'_>, ) -> Result<(), SerializeError>
Serializes to a byte writer.
impl<'a, const LENGTH: usize> Eq for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> StructuralPartialEq for FixedLengthString<'a, LENGTH>
Auto Trait Implementations§
impl<'a, const LENGTH: usize> Freeze for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> RefUnwindSafe for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> Send for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> Sync for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> Unpin for FixedLengthString<'a, LENGTH>
impl<'a, const LENGTH: usize> UnwindSafe for FixedLengthString<'a, LENGTH>
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