Skip to main content

EvmCdString

Struct EvmCdString 

Source
pub struct EvmCdString<const MIN: usize, const CAP: usize> { /* private fields */ }

Implementations§

Source§

impl<const MIN: usize, const CAP: usize> EvmCdString<MIN, CAP>

Source

pub fn try_from_str(value: &str) -> Result<Self, EvmCdStringError>

Source

pub const fn len(&self) -> usize

Source

pub const fn is_empty(&self) -> bool

Source

pub const fn capacity(&self) -> usize

Source

pub fn as_bytes(&self) -> &[u8] ⓘ

Source

pub fn as_str(&self) -> &str

Trait Implementations§

Source§

impl<const MIN: usize, const CAP: usize> AsRef<[u8]> for EvmCdString<MIN, CAP>

Source§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<const MIN: usize, const CAP: usize> AsRef<str> for EvmCdString<MIN, CAP>

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<const MIN: usize, const CAP: usize> Borrow<str> for EvmCdString<MIN, CAP>

Source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
Source§

impl<const MIN: usize, const CAP: usize> Clone for EvmCdString<MIN, CAP>

Source§

fn clone(&self) -> EvmCdString<MIN, CAP>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const MIN: usize, const CAP: usize> Debug for EvmCdString<MIN, CAP>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<const MIN: usize, const CAP: usize> Display for EvmCdString<MIN, CAP>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<const MIN: usize, const CAP: usize> Eq for EvmCdString<MIN, CAP>

Source§

impl<const MIN: usize, const CAP: usize> EvmCdDeserialise for EvmCdString<MIN, CAP>

Source§

type Buffer = EvmCdBuffer<([u8; 64], [u8; CAP], [u8; 31])>

Source§

fn deserialise_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

Source§

fn new_buffer(len: usize) -> Result<Self::Buffer, Error>

Source§

fn deserialise<B>(bytes: &B) -> Result<Self, Error>
where B: AsRef<[u8]> + ?Sized,

Source§

impl<const MIN: usize, const CAP: usize> EvmCdSerialise for EvmCdString<MIN, CAP>

Source§

fn serialise<W: Write>(&self, writer: &mut W) -> Result<(), Error>

Source§

impl<const MIN: usize, const CAP: usize> From<EvmCdString<MIN, CAP>> for String

Available on crate feature alloc only.
Source§

fn from(value: EvmCdString<MIN, CAP>) -> Self

Converts to this type from the input type.
Source§

impl<const MIN: usize, const CAP: usize> FromStr for EvmCdString<MIN, CAP>

Source§

type Err = EvmCdStringError

The associated error which can be returned from parsing.
Source§

fn from_str(value: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<const MIN: usize, const CAP: usize> Hash for EvmCdString<MIN, CAP>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<const MIN: usize, const CAP: usize> Ord for EvmCdString<MIN, CAP>

Source§

fn cmp(&self, other: &EvmCdString<MIN, CAP>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl<const MIN: usize, const CAP: usize> PartialEq for EvmCdString<MIN, CAP>

Source§

fn eq(&self, other: &EvmCdString<MIN, CAP>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<const MIN: usize, const CAP: usize> PartialOrd for EvmCdString<MIN, CAP>

Source§

fn partial_cmp(&self, other: &EvmCdString<MIN, CAP>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<const MIN: usize, const CAP: usize> StructuralPartialEq for EvmCdString<MIN, CAP>

Source§

impl<const MIN: usize, const CAP: usize> TryFrom<&str> for EvmCdString<MIN, CAP>

Source§

type Error = EvmCdStringError

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

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

Performs the conversion.

Auto Trait Implementations§

§

impl<const MIN: usize, const CAP: usize> Freeze for EvmCdString<MIN, CAP>
where [u8; CAP]: Freeze,

§

impl<const MIN: usize, const CAP: usize> RefUnwindSafe for EvmCdString<MIN, CAP>
where [u8; CAP]: RefUnwindSafe,

§

impl<const MIN: usize, const CAP: usize> Send for EvmCdString<MIN, CAP>
where [u8; CAP]: Send,

§

impl<const MIN: usize, const CAP: usize> Sync for EvmCdString<MIN, CAP>
where [u8; CAP]: Sync,

§

impl<const MIN: usize, const CAP: usize> Unpin for EvmCdString<MIN, CAP>
where [u8; CAP]: Unpin,

§

impl<const MIN: usize, const CAP: usize> UnsafeUnpin for EvmCdString<MIN, CAP>
where [u8; CAP]: UnsafeUnpin,

§

impl<const MIN: usize, const CAP: usize> UnwindSafe for EvmCdString<MIN, CAP>
where [u8; CAP]: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToHex for T
where T: AsRef<[u8]>,

Source§

fn encode_hex<U>(&self) -> U
where U: FromIterator<char>,

👎Deprecated:

use ToHexExt instead

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca).
Source§

fn encode_hex_upper<U>(&self) -> U
where U: FromIterator<char>,

👎Deprecated:

use ToHexExt instead

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA).
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.