Str0255

Type Alias Str0255 

Source
pub type Str0255<'a> = Inner<'a, false, 1, 1, 255>;
Expand description

Type alias for a variable-sized string with a maximum size of 255 bytes, represented using the Inner type with a 1-byte header.

Aliased Type§

pub enum Str0255<'a> {}

Implementations§

Source§

impl Str0255<'_>

Source

pub fn as_utf8_or_hex(&self) -> String

Returns the value as a UTF-8 string if possible, otherwise as a hex string prefixed with 0x.

Trait Implementations§

Source§

impl TryFrom<String> for Str0255<'_>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: String) -> Result<Self, Self::Error>

Performs the conversion.