Struct simple_tlv::Slice[][src]

pub struct Slice<'a> { /* fields omitted */ }

Slice of at most Length::max() bytes.

Implementations

impl<'a> Slice<'a>[src]

pub fn new(slice: &'a [u8]) -> Result<Self>[src]

Create a new Slice, ensuring that the provided slice value is shorter than Length::max().

pub fn as_bytes(&self) -> &'a [u8][src]

Borrow the inner byte slice

pub fn length(self) -> Length[src]

Get the Length of this Slice

pub fn is_empty(self) -> bool[src]

Is this Slice empty?

Trait Implementations

impl AsRef<[u8]> for Slice<'_>[src]

impl<'a> Clone for Slice<'a>[src]

impl<'a> Copy for Slice<'a>[src]

impl<'a> Debug for Slice<'a>[src]

impl<'a> Eq for Slice<'a>[src]

impl<'a> PartialEq<Slice<'a>> for Slice<'a>[src]

impl<'a> StructuralEq for Slice<'a>[src]

impl<'a> StructuralPartialEq for Slice<'a>[src]

Auto Trait Implementations

impl<'a> Send for Slice<'a>[src]

impl<'a> Sync for Slice<'a>[src]

impl<'a> Unpin for Slice<'a>[src]

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, 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.