Struct ckb_types::packed::ByteReader
source · pub struct ByteReader<'r>(/* private fields */);
Implementations§
source§impl<'r> ByteReader<'r>
impl<'r> ByteReader<'r>
pub const NAME: &'r str = "ByteReader"
pub fn to_entity(self) -> Byte
pub fn new_unchecked(slice: &'r [u8]) -> ByteReader<'r>
pub fn as_slice(&self) -> &'r [u8] ⓘ
pub fn verify(slice: &[u8], _compatible: bool) -> Result<(), VerificationError>
pub fn from_slice(slice: &'r [u8]) -> Result<ByteReader<'r>, VerificationError>
pub fn from_compatible_slice( slice: &'r [u8] ) -> Result<ByteReader<'r>, VerificationError>
Trait Implementations§
source§impl<'r> Clone for ByteReader<'r>
impl<'r> Clone for ByteReader<'r>
source§fn clone(&self) -> ByteReader<'r>
fn clone(&self) -> ByteReader<'r>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'r> Debug for ByteReader<'r>
impl<'r> Debug for ByteReader<'r>
source§impl<'r> Display for ByteReader<'r>
impl<'r> Display for ByteReader<'r>
source§impl<'r> Hash for ByteReader<'r>
impl<'r> Hash for ByteReader<'r>
source§impl<'r> Ord for ByteReader<'r>
impl<'r> Ord for ByteReader<'r>
source§fn cmp(&self, other: &ByteReader<'r>) -> Ordering
fn cmp(&self, other: &ByteReader<'r>) -> Ordering
1.21.0 · 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
source§impl<'r> PartialEq for ByteReader<'r>
impl<'r> PartialEq for ByteReader<'r>
source§fn eq(&self, other: &ByteReader<'r>) -> bool
fn eq(&self, other: &ByteReader<'r>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'r> PartialOrd for ByteReader<'r>
impl<'r> PartialOrd for ByteReader<'r>
source§fn partial_cmp(&self, other: &ByteReader<'r>) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteReader<'r>) -> Option<Ordering>
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 moreimpl<'r> Copy for ByteReader<'r>
impl<'r> Eq for ByteReader<'r>
impl<'r> StructuralPartialEq for ByteReader<'r>
Auto Trait Implementations§
impl<'r> RefUnwindSafe for ByteReader<'r>
impl<'r> Send for ByteReader<'r>
impl<'r> Sync for ByteReader<'r>
impl<'r> Unpin for ByteReader<'r>
impl<'r> UnwindSafe for ByteReader<'r>
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