[][src]Struct bigbit::linkedbytes::LBSequence

pub struct 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]

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]

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]

Returns an iterator over the linked bytes in little-endian byte order.

pub fn iter_be(
    &self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
[src]

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]

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]

Returns an iterator over mutable references to the linked bytes in big-endian byte order.

Trait Implementations

impl AsMut<[LinkedByte]> for LBSequence[src]

impl AsRef<[LinkedByte]> for LBSequence[src]

impl Borrow<[LinkedByte]> for LBSequence[src]

impl BorrowMut<[LinkedByte]> for LBSequence[src]

impl Clone for LBSequence[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]

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

impl Send for LBSequence

impl Sync for LBSequence

impl Unpin for LBSequence

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.