Private routing information
The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops)
Create a new (partial) route from a list of hops
Returrn the underlying vector of hops
Returns the number of elements the vector can hold without
reallocating.
let vec: Vec<i32> = Vec::with_capacity(10);
assert_eq!(vec.capacity(), 10);
Extracts a slice containing the entire vector.
Equivalent to &s[..]
.
use std::io::{self, Write};
let buffer = vec![1, 2, 3, 5, 8];
io::sink().write(buffer.as_slice()).unwrap();
Returns the number of elements in the vector, also referred to
as its 'length'.
let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);
Returns true
if the vector contains no elements.
let mut v = Vec::new();
assert!(v.is_empty());
v.push(1);
assert!(!v.is_empty());
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
The associated error which can be returned from parsing (e.g. because of bad padding).
Convert a base32 slice to Self
.
Convert Self
to base32 slice
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Convert base256 to base32, adds padding if necessary