pub struct EvmCdBytes<const CAP: usize> {
pub len: usize,
pub bytes: [u8; CAP],
}Fields§
§len: usize§bytes: [u8; CAP]Implementations§
Source§impl<const CAP: usize> EvmCdBytes<CAP>
impl<const CAP: usize> EvmCdBytes<CAP>
pub const fn new() -> Self
pub fn try_from_slice(value: &[u8]) -> Result<Self, EvmCdBytesError>
pub fn try_from_serialised<T: EvmCdSerialise + ?Sized>( value: &T, ) -> Result<Self, Error>
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub const fn capacity(&self) -> usize
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn clear(&mut self)
pub fn extend_from_slice(&mut self, value: &[u8]) -> Result<(), EvmCdBytesError>
Trait Implementations§
Source§impl<const CAP: usize> Clone for EvmCdBytes<CAP>
impl<const CAP: usize> Clone for EvmCdBytes<CAP>
Source§impl<const CAP: usize> Debug for EvmCdBytes<CAP>
impl<const CAP: usize> Debug for EvmCdBytes<CAP>
Source§impl<const CAP: usize> Default for EvmCdBytes<CAP>
impl<const CAP: usize> Default for EvmCdBytes<CAP>
impl<const CAP: usize> Eq for EvmCdBytes<CAP>
Source§impl<const CAP: usize> EvmCdDeserialise for EvmCdBytes<CAP>
impl<const CAP: usize> EvmCdDeserialise for EvmCdBytes<CAP>
Source§impl<const CAP: usize> EvmCdSerialise for EvmCdBytes<CAP>
impl<const CAP: usize> EvmCdSerialise for EvmCdBytes<CAP>
Source§impl<const CAP: usize> EvmCdWriteTarget for EvmCdBytes<CAP>
impl<const CAP: usize> EvmCdWriteTarget for EvmCdBytes<CAP>
Source§impl<const CAP: usize> Hash for EvmCdBytes<CAP>
impl<const CAP: usize> Hash for EvmCdBytes<CAP>
Source§impl<const CAP: usize> Ord for EvmCdBytes<CAP>
impl<const CAP: usize> Ord for EvmCdBytes<CAP>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<const CAP: usize> PartialEq for EvmCdBytes<CAP>
impl<const CAP: usize> PartialEq for EvmCdBytes<CAP>
Source§impl<const CAP: usize> PartialOrd for EvmCdBytes<CAP>
impl<const CAP: usize> PartialOrd for EvmCdBytes<CAP>
Auto Trait Implementations§
impl<const CAP: usize> Freeze for EvmCdBytes<CAP>
impl<const CAP: usize> RefUnwindSafe for EvmCdBytes<CAP>
impl<const CAP: usize> Send for EvmCdBytes<CAP>
impl<const CAP: usize> Sync for EvmCdBytes<CAP>
impl<const CAP: usize> Unpin for EvmCdBytes<CAP>
impl<const CAP: usize> UnsafeUnpin for EvmCdBytes<CAP>
impl<const CAP: usize> UnwindSafe for EvmCdBytes<CAP>
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<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
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) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
👎Deprecated:
use ToHexExt instead
Encode the hex strict representing
self into the result.
Upper case letters are used (e.g. F9B4CA).