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]

[src]

Construct a new Input for the given input bytes.

[src]

Returns true if the input is empty and false otherwise.

[src]

Returns an iterator over the input.

[src]

Returns the length of the Input.

[src]

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.

[src]

Like read_all, except taking an FnMut.

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

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

[src]

Formats the value using the given formatter.

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

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

[src]

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

1.0.0
[src]

This method tests for !=.

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

[src]

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

1.0.0
[src]

This method tests for !=.