Struct rubbish::cas::Hash
[−]
[src]
pub struct Hash(_);
Type Hash represents the key under which content is stored.
Methods
impl Hash
[src]
fn from_hex(hex: &str) -> Hash
Create a new hash, given a hex representation.
fn for_bytes(bytes: &Vec<u8>) -> Hash
Create a new hash for the given content
fn to_hex(&self) -> String
Trait Implementations
impl PartialEq for Hash
[src]
fn eq(&self, __arg_0: &Hash) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Hash) -> bool
This method tests for !=
.
impl Eq for Hash
[src]
impl Hash for Hash
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for Hash
[src]
fn clone(&self) -> Hash
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 Decodable for Hash
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Hash, __D::Error>
Deserialize a value using a Decoder
.
impl Encodable for Hash
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
Serialize a value using an Encoder
.