# Struct rlp::Rlp [−] [src]

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

Data-oriented view onto trusted rlp-slice.

Unlikely to `UntrustedRlp` doesn't bother you with error handling. It assumes that you know what you are doing.

## Methods

### `impl<'a, 'view> Rlp<'a> where 'a: 'view`
[src]

#### `fn as_val<T>(&self) -> T where T: RlpDecodable`

Decode into an object

#### `fn val_at<T>(&self, index: usize) -> T where T: RlpDecodable`

Decode list item at given index into an object

## Trait Implementations

### `impl<'a> From<UntrustedRlp<'a>> for Rlp<'a>`
[src]

#### `fn from(rlp: UntrustedRlp<'a>) -> Rlp<'a>`

Performs the conversion.

### `impl<'a> Debug for Rlp<'a>`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl<'a> Display for Rlp<'a>`
[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result<(), Error>`

Formats the value using the given formatter.

### `impl<'a, 'view> View<'a, 'view> for Rlp<'a> where 'a: 'view`
[src]

#### `type Prototype = Prototype`

RLP prototype type

#### `type PayloadInfo = PayloadInfo`

Payload info type

#### `type Data = &'a [u8]`

Data type

#### `type Item = Rlp<'a>`

Item type

#### `type Iter = RlpIterator<'a, 'view>`

Iterator type

#### `fn new(bytes: &'a [u8]) -> Rlp<'a>`

Create a new instance of `Rlp`

#### `fn as_raw(&'view self) -> &'a [u8]`

The raw data of the RLP as slice. Read more

#### `fn prototype(&self) -> Self::Prototype`

Get the prototype of the RLP.

#### `fn payload_info(&self) -> Self::PayloadInfo`

Get payload info.

#### `fn data(&'view self) -> Self::Data`

Get underlieing data.

#### `fn item_count(&self) -> usize`

Returns number of RLP items. Read more

#### `fn size(&self) -> usize`

Returns the number of bytes in the data, or zero if it isn't data. Read more

#### `fn at(&'view self, index: usize) -> Self::Item`

Get view onto RLP-slice at index. Read more

#### `fn is_null(&self) -> bool`

No value Read more

#### `fn is_empty(&self) -> bool`

Contains a zero-length string or zero-length list. Read more

#### `fn is_list(&self) -> bool`

List value Read more

#### `fn is_data(&self) -> bool`

String value Read more

#### `fn is_int(&self) -> bool`

Int value Read more

#### `fn iter(&'view self) -> Self::Iter`

Get iterator over rlp-slices Read more

#### `fn as_val<T>(&self) -> Result<T, DecoderError> where T: RlpDecodable`

Decode data into an object

#### `fn val_at<T>(&self, index: usize) -> Result<T, DecoderError> where T: RlpDecodable`

Decode data at given list index into an object

### `impl<'a, 'view> IntoIterator for &'view Rlp<'a> where 'a: 'view`
[src]

#### `type Item = Rlp<'a>`

The type of the elements being iterated over.

#### `type IntoIter = RlpIterator<'a, 'view>`

Which kind of iterator are we turning this into?

#### `fn into_iter(self) -> Self::IntoIter`

Creates an iterator from a value. Read more

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)