[−][src]Struct bigbit::linkedbytes::LBSequence
An owned unchecked Linked Bytes sequence, used for storing either strings or numbers.
Methods
impl LBSequence
[src]
#[must_use]pub const fn empty() -> Self
[src]
Creates an empty LBSequence
.
#[must_use]pub const fn inner(&self) -> &Vec<LinkedByte>
[src]
Immutably borrows the inner container.
#[must_use]pub fn inner_mut(&mut self) -> &mut Vec<LinkedByte>
[src]
Mutably borrows the inner container.
pub fn get<I: SliceIndex<[LinkedByte]>>(
&self,
index: I
) -> Option<&<I as SliceIndex<[LinkedByte]>>::Output>
[src]
&self,
index: I
) -> Option<&<I as SliceIndex<[LinkedByte]>>::Output>
Performs slice indexing.
See the standard library documentation for more.
pub fn get_mut<I: SliceIndex<[LinkedByte]>>(
&mut self,
index: I
) -> Option<&mut <I as SliceIndex<[LinkedByte]>>::Output>
[src]
&mut self,
index: I
) -> Option<&mut <I as SliceIndex<[LinkedByte]>>::Output>
Performs mutable slice indexing.
See the standard library documentation for more.
#[must_use]pub fn len(&self) -> usize
[src]
Returns the number of bytes in the sequence.
#[must_use]pub fn is_empty(&self) -> bool
[src]
Returns true
if the sequence is empty (= 0) or false
otherwise.
pub fn iter_le(
&self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
[src]
&self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
Returns an iterator over the linked bytes in little-endian byte order.
pub fn iter_be(
&self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
[src]
&self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
Returns an iterator over the linked bytes in big-endian byte order.
pub fn iter_mut_le(
&mut self
) -> impl Iterator<Item = &mut LinkedByte> + DoubleEndedIterator + '_
[src]
&mut self
) -> impl Iterator<Item = &mut LinkedByte> + DoubleEndedIterator + '_
Returns an iterator over mutable references to the linked bytes in little-endian byte order.
pub fn iter_mut_be(
&mut self
) -> impl Iterator<Item = &mut LinkedByte> + DoubleEndedIterator + '_
[src]
&mut self
) -> impl Iterator<Item = &mut LinkedByte> + DoubleEndedIterator + '_
Returns an iterator over mutable references to the linked bytes in big-endian byte order.
Trait Implementations
impl AsMut<[LinkedByte]> for LBSequence
[src]
fn as_mut(&mut self) -> &mut [LinkedByte]
[src]
impl AsRef<[LinkedByte]> for LBSequence
[src]
fn as_ref(&self) -> &[LinkedByte]
[src]
impl Borrow<[LinkedByte]> for LBSequence
[src]
fn borrow(&self) -> &[LinkedByte]
[src]
impl BorrowMut<[LinkedByte]> for LBSequence
[src]
fn borrow_mut(&mut self) -> &mut [LinkedByte]
[src]
impl Clone for LBSequence
[src]
fn clone(&self) -> LBSequence
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LBSequence
[src]
impl<'_> From<&'_ [LinkedByte]> for LBSequence
[src]
#[must_use]fn from(op: &[LinkedByte]) -> Self
[src]
Clones the contens of the slice into a Linked Bytes sequence.
impl From<Vec<LinkedByte>> for LBSequence
[src]
#[must_use]fn from(op: Vec<LinkedByte>) -> Self
[src]
impl FromIterator<LinkedByte> for LBSequence
[src]
#[must_use]fn from_iter<T: IntoIterator<Item = LinkedByte>>(op: T) -> Self
[src]
Converts an iterator over linked bytes into an LBSequence
. Little-endian byte order is assumed, regardless of platform.
impl TryFrom<LBSequence> for LBNum
[src]
type Error = InvalidLBSequence
The type returned in the event of a conversion error.
fn try_from(op: LBSequence) -> DecodeResult
[src]
Converts an LBSequence
into an LBNum
. Little-endian byte order is assumed, regardless of platform.
Errors
See InvalidLBSequence
.
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,