BoundedString256

Type Alias BoundedString256 

Source
pub type BoundedString256 = BoundedString<256>;

Aliased Type§

pub struct BoundedString256(pub String);

Tuple Fields§

§0: String

Trait Implementations§

Source§

impl Storable for BoundedString256

Source§

const BOUND: Bound

The size bounds of the type.
Source§

fn to_bytes(&self) -> Cow<'_, [u8]>

Converts the element into a possibly borrowed byte slice. Read more
Source§

fn into_bytes(self) -> Vec<u8>

Converts the element into an owned byte vector. Read more
Source§

fn from_bytes(bytes: Cow<'_, [u8]>) -> Self

Converts bytes into an element.
Source§

fn to_bytes_checked(&self) -> Cow<'_, [u8]>

Like to_bytes, but checks that bytes conform to declared bounds.
Source§

fn into_bytes_checked(self) -> Vec<u8>
where Self: Sized,

Like into_bytes, but checks that bytes conform to declared bounds.
Source§

fn check_bounds(bytes: &[u8])

Validates that a byte slice fits within this type’s declared bounds.