Struct chik_protocol::bytes::Bytes
source · pub struct Bytes(/* private fields */);Implementations§
Trait Implementations§
source§impl<N> FromKlvm<N> for Bytes
impl<N> FromKlvm<N> for Bytes
fn from_klvm( decoder: &impl KlvmDecoder<Node = N>, node: N ) -> Result<Self, FromKlvmError>
source§impl Ord for Bytes
impl Ord for Bytes
source§impl<const N: usize> PartialEq<&[u8; N]> for Bytes
impl<const N: usize> PartialEq<&[u8; N]> for Bytes
source§impl<const N: usize> PartialEq<[u8; N]> for Bytes
impl<const N: usize> PartialEq<[u8; N]> for Bytes
source§impl PartialEq<Vec<u8>> for Bytes
impl PartialEq<Vec<u8>> for Bytes
source§impl PartialEq for Bytes
impl PartialEq for Bytes
source§impl PartialOrd for Bytes
impl PartialOrd for Bytes
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Streamable for Bytes
impl Streamable for Bytes
fn update_digest(&self, digest: &mut Sha256)
fn stream(&self, out: &mut Vec<u8>) -> Result<()>
fn parse<const TRUSTED: bool>(input: &mut Cursor<&[u8]>) -> Result<Self>
fn to_bytes(&self) -> Result<Vec<u8>, Error>
fn from_bytes(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn hash(&self) -> [u8; 32]
source§impl<N> ToKlvm<N> for Bytes
impl<N> ToKlvm<N> for Bytes
fn to_klvm( &self, encoder: &mut impl KlvmEncoder<Node = N> ) -> Result<N, ToKlvmError>
impl Eq for Bytes
impl StructuralPartialEq for Bytes
Auto Trait Implementations§
impl RefUnwindSafe for Bytes
impl Send for Bytes
impl Sync for Bytes
impl Unpin for Bytes
impl UnwindSafe for Bytes
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> FromNodePtr for T
impl<T> FromNodePtr for T
fn from_node_ptr(a: &Allocator, node: NodePtr) -> Result<T, FromKlvmError>
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>,
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>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)