pub struct Bytes(/* private fields */);
Implementations§
source§impl Bytes
impl Bytes
sourcepub fn calc_raw_data_hash(&self) -> Byte32
pub fn calc_raw_data_hash(&self) -> Byte32
Calls BytesReader.calc_raw_data_hash()
for self.as_reader()
.
source§impl Bytes
impl Bytes
pub const ITEM_SIZE: usize = 1usize
pub fn total_size(&self) -> usize
pub fn item_count(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, idx: usize) -> Option<Byte>
pub fn get_unchecked(&self, idx: usize) -> Byte
pub fn raw_data(&self) -> Bytes
pub fn as_reader<'r>(&'r self) -> BytesReader<'r>
Trait Implementations§
source§impl Entity for Bytes
impl Entity for Bytes
type Builder = BytesBuilder
const NAME: &'static str = "Bytes"
fn new_unchecked(data: Bytes) -> Bytes
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8] ⓘ
fn from_slice(slice: &[u8]) -> Result<Bytes, VerificationError>
fn from_compatible_slice(slice: &[u8]) -> Result<Bytes, VerificationError>
fn new_builder() -> <Bytes as Entity>::Builder
fn as_builder(self) -> <Bytes as Entity>::Builder
source§impl IntoIterator for Bytes
impl IntoIterator for Bytes
source§impl Ord for Bytes
impl Ord 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 moreimpl Eq 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