Struct untrusted::Input [] [src]

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

A wrapper around &'a [u8] that helps in writing panic-free code.

No methods of Input will ever panic.

Methods

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

Construct a new Input for the given input bytes.

Returns true if the input is empty and false otherwise.

Returns an iterator over the input.

Returns the length of the Input.

Calls read with the given input as a Reader, ensuring that read consumed the entire input. If read does not consume the entire input, incomplete_read is returned.

Like read_all, except taking an FnMut.

Access the input as a slice so it can be processed by functions that are not written using the Input/Reader framework.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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

Formats the value using the given formatter.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a, 'b> PartialEq<&'b [u8]> for Input<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.