rocket::mtls::x509::der_parser::asn1_rs::nom

Trait InputTake

Source
pub trait InputTake: Sized {
    // Required methods
    fn take(&self, count: usize) -> Self;
    fn take_split(&self, count: usize) -> (Self, Self);
}
Available on crate feature mtls only.
Expand description

Abstracts slicing operations

Required Methods§

Source

fn take(&self, count: usize) -> Self

Returns a slice of count bytes. panics if count > length

Source

fn take_split(&self, count: usize) -> (Self, Self)

Split the stream at the count byte offset. panics if count > length

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> InputTake for &'a str

Source§

fn take(&self, count: usize) -> &'a str

Source§

fn take_split(&self, count: usize) -> (&'a str, &'a str)

Source§

impl<'a> InputTake for &'a [u8]

Source§

fn take(&self, count: usize) -> &'a [u8]

Source§

fn take_split(&self, count: usize) -> (&'a [u8], &'a [u8])

Implementors§