[−][src]Struct simple_tlv::Slice
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]
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]
fn clone(&self) -> Slice<'a>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[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
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,
pub 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, 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.
pub 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>,