pub struct CharStrBuf { /* private fields */ }Available on crate feature
unstable-new only.Expand description
A 256-byte buffer for a character string.
Implementations§
Source§impl CharStrBuf
impl CharStrBuf
Sourcepub fn copy_from(string: &CharStr) -> Self
pub fn copy_from(string: &CharStr) -> Self
Copy a CharStrBuf into a buffer.
Source§impl CharStrBuf
impl CharStrBuf
Sourcepub fn wire_bytes(&self) -> &[u8] ⓘ
pub fn wire_bytes(&self) -> &[u8] ⓘ
The wire format for this character string.
Trait Implementations§
Source§impl AsMut<CharStr> for CharStrBuf
impl AsMut<CharStr> for CharStrBuf
Source§impl AsRef<CharStr> for CharStrBuf
impl AsRef<CharStr> for CharStrBuf
Source§impl Borrow<CharStr> for CharStrBuf
impl Borrow<CharStr> for CharStrBuf
Source§impl BorrowMut<CharStr> for CharStrBuf
impl BorrowMut<CharStr> for CharStrBuf
Source§fn borrow_mut(&mut self) -> &mut CharStr
fn borrow_mut(&mut self) -> &mut CharStr
Mutably borrows from an owned value. Read more
Source§impl BuildBytes for CharStrBuf
impl BuildBytes for CharStrBuf
Source§fn build_bytes<'b>(
&self,
bytes: &'b mut [u8],
) -> Result<&'b mut [u8], TruncationError>
fn build_bytes<'b>( &self, bytes: &'b mut [u8], ) -> Result<&'b mut [u8], TruncationError>
Serialize into a byte sequence. Read more
Source§fn built_bytes_size(&self) -> usize
fn built_bytes_size(&self) -> usize
The size of
self when serialized into a byte sequence. Read moreSource§impl BuildInMessage for CharStrBuf
impl BuildInMessage for CharStrBuf
Source§fn build_in_message(
&self,
contents: &mut [u8],
start: usize,
name: &mut NameCompressor,
) -> Result<usize, TruncationError>
fn build_in_message( &self, contents: &mut [u8], start: usize, name: &mut NameCompressor, ) -> Result<usize, TruncationError>
Write this object in a DNS message. Read more
Source§impl Clone for CharStrBuf
impl Clone for CharStrBuf
Source§fn clone(&self) -> CharStrBuf
fn clone(&self) -> CharStrBuf
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CharStrBuf
impl Debug for CharStrBuf
Source§impl Deref for CharStrBuf
impl Deref for CharStrBuf
Source§impl DerefMut for CharStrBuf
impl DerefMut for CharStrBuf
impl Eq for CharStrBuf
Source§impl FromStr for CharStrBuf
impl FromStr for CharStrBuf
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse a DNS “character-string” from a string.
This is intended for easily constructing hard-coded character strings.
This function cannot parse all valid character strings; if exceptional
instances are needed, use CharStr::from_bytes_unchecked().
Source§type Err = CharStrParseError
type Err = CharStrParseError
The associated error which can be returned from parsing.
Source§impl ParseBytes<'_> for CharStrBuf
impl ParseBytes<'_> for CharStrBuf
Source§fn parse_bytes(bytes: &[u8]) -> Result<Self, ParseError>
fn parse_bytes(bytes: &[u8]) -> Result<Self, ParseError>
Source§impl ParseMessageBytes<'_> for CharStrBuf
impl ParseMessageBytes<'_> for CharStrBuf
Source§fn parse_message_bytes(
contents: &[u8],
start: usize,
) -> Result<Self, ParseError>
fn parse_message_bytes( contents: &[u8], start: usize, ) -> Result<Self, ParseError>
Parse a value from bytes in a DNS message. Read more
Source§impl PartialEq for CharStrBuf
impl PartialEq for CharStrBuf
Source§impl SplitBytes<'_> for CharStrBuf
impl SplitBytes<'_> for CharStrBuf
Source§fn split_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), ParseError>
fn split_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), ParseError>
Source§impl SplitMessageBytes<'_> for CharStrBuf
impl SplitMessageBytes<'_> for CharStrBuf
Source§fn split_message_bytes(
contents: &[u8],
start: usize,
) -> Result<(Self, usize), ParseError>
fn split_message_bytes( contents: &[u8], start: usize, ) -> Result<(Self, usize), ParseError>
Parse a value from the start of a byte sequence within a DNS message. Read more
Source§impl UnsizedCopyFrom for CharStrBuf
impl UnsizedCopyFrom for CharStrBuf
Auto Trait Implementations§
impl Freeze for CharStrBuf
impl RefUnwindSafe for CharStrBuf
impl Send for CharStrBuf
impl Sync for CharStrBuf
impl Unpin for CharStrBuf
impl UnsafeUnpin for CharStrBuf
impl UnwindSafe for CharStrBuf
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.