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
const NAME: &'static str = "Bytes"
type Builder = BytesBuilder
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 PartialOrd for Bytes
impl PartialOrd for Bytes
impl Eq for Bytes
Auto Trait Implementations§
impl !Freeze for Bytes
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)