pub struct Bytes(_);
Implementations
sourceimpl 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>
sourceimpl 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()
.
Trait Implementations
sourceimpl Entity for Bytes
impl Entity for Bytes
type Builder = BytesBuilder
const NAME: &'static str = "Bytes"
fn new_unchecked(data: Bytes) -> Self
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn from_slice(slice: &[u8]) -> VerificationResult<Self>
fn from_compatible_slice(slice: &[u8]) -> VerificationResult<Self>
fn new_builder() -> Self::Builder
fn as_builder(self) -> Self::Builder
sourceimpl IntoIterator for Bytes
impl IntoIterator 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more