# Struct ethcore_util::nibblevec::NibbleVec [−] [src]

    pub struct NibbleVec { /* fields omitted */ }

Owning, nibble-oriented byte vector. Counterpart to `NibbleSlice`.

## Methods

### `impl NibbleVec`
[src]

#### `fn new() -> Self`

Make a new `NibbleVec`

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

Length of the `NibbleVec`

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

Retrurns true if `NibbleVec` has zero length

#### `fn at(&self, idx: usize) -> u8`

Try to get the nibble at the given offset.

#### `fn push(&mut self, nibble: u8)`

Push a nibble onto the `NibbleVec`. Ignores the high 4 bits.

#### `fn pop(&mut self) -> Option<u8>`

Try to pop a nibble off the `NibbleVec`. Fails if len == 0.

#### `fn as_nibbleslice(&self) -> Option<NibbleSlice>`

Try to treat this `NibbleVec` as a `NibbleSlice`. Works only if len is even.

#### `fn inner(&self) -> &[u8]`

Get the underlying byte slice.

## Trait Implementations

### `impl Clone for NibbleVec`
[src]

#### `fn clone(&self) -> NibbleVec`

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0

Performs copy-assignment from `source`. Read more

### `impl PartialEq for NibbleVec`
[src]

#### `fn eq(&self, __arg_0: &NibbleVec) -> bool`

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

#### `fn ne(&self, __arg_0: &NibbleVec) -> bool`

This method tests for `!=`.

### `impl Eq for NibbleVec`
[src]

### `impl Debug for NibbleVec`
[src]

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

Formats the value using the given formatter.

### `impl Default for NibbleVec`
[src]

#### `fn default() -> Self`

Returns the "default value" for a type. Read more

### `impl<'a> From<NibbleSlice<'a>> for NibbleVec`
[src]

#### `fn from(s: NibbleSlice<'a>) -> Self`

Performs the conversion.

# 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`)