pub struct Dataset {
pub id: Uuid,
pub hash: Vec<u8>,
/* private fields */
}Expand description
Reference to one data file
This stores an id to identify to file, a hash to verify it and some metadata that is associated with the data.
Note that this does not specify exactly where the file is stored.
By default sha2 is used to generate a SHA-512 hash of the file if the sha feature is enabled.
Manually calculating the hash and using from_hash allows for other hash functions as long as the hash is representable as Vec<u8>.
Every time that is serializable into a Map can be used as metadata.
Fields§
§id: UuidId of file
hash: Vec<u8>Hash of file
Implementations§
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for Dataset
impl<'arbitrary> Arbitrary<'arbitrary> for Dataset
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moresource§impl<'de> Deserialize<'de> for Dataset
impl<'de> Deserialize<'de> for Dataset
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Dataset
impl Ord for Dataset
source§impl PartialEq for Dataset
impl PartialEq for Dataset
source§impl PartialOrd for Dataset
impl PartialOrd for Dataset
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Dataset
impl StructuralEq for Dataset
impl StructuralPartialEq for Dataset
Auto Trait Implementations§
impl RefUnwindSafe for Dataset
impl Send for Dataset
impl Sync for Dataset
impl Unpin for Dataset
impl UnwindSafe for Dataset
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more