Type Alias WireUrl

Source
pub type WireUrl<'de> = WireString<'de>;
Expand description

The wire type corresponding to Url.

Aliased Type§

struct WireUrl<'de> { /* private fields */ }

Implementations

§

impl WireString<'_>

pub fn encode_present(out: &mut MaybeUninit<WireString<'_>>, len: u64)

Encodes that a string is present in a slot.

pub fn len(&self) -> usize

Returns the length of the string in bytes.

pub fn is_empty(&self) -> bool

Returns whether the string is empty.

pub fn as_str(&self) -> &str

Returns a reference to the underlying str.

Trait Implementations

§

impl Debug for WireString<'_>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<D> Decode<D> for WireString<'static>
where D: Decoder + ?Sized,

§

fn decode( slot: Slot<'_, WireString<'static>>, decoder: &mut D, ) -> Result<(), DecodeError>

Decodes a value into a slot using a decoder. Read more
§

impl Deref for WireString<'_>

§

type Target = str

The resulting type after dereferencing.
§

fn deref(&self) -> &<WireString<'_> as Deref>::Target

Dereferences the value.
§

impl Wire for WireString<'static>

§

type Decoded<'de> = WireString<'de>

The decoded wire type, restricted to the 'de lifetime.
§

fn zero_padding(out: &mut MaybeUninit<WireString<'static>>)

Writes zeroes to the padding for this type, if any.