#[non_exhaustive]pub enum DecoderLocation {
Embedded {
section: u32,
},
External,
}Expand description
Where the decoder module for a dataset lives.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Embedded
In a section of this container, named by its section id.
This is the self-decoding case and the one the project is about. The dataset carries the code that reads it, so a host that has never seen the encoding can still read the data.
External
Somewhere else, to be resolved by digest.
Useful when many datasets share one decoder and nobody wants a copy of it in every file. The digest is what makes this safe: the host either finds bytes that hash to it or it does not run anything.
Trait Implementations§
Source§impl Clone for DecoderLocation
impl Clone for DecoderLocation
Source§fn clone(&self) -> DecoderLocation
fn clone(&self) -> DecoderLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DecoderLocation
Source§impl Debug for DecoderLocation
impl Debug for DecoderLocation
Source§impl<'de> Deserialize<'de> for DecoderLocation
impl<'de> Deserialize<'de> for DecoderLocation
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
impl Eq for DecoderLocation
Source§impl PartialEq for DecoderLocation
impl PartialEq for DecoderLocation
Source§impl Serialize for DecoderLocation
impl Serialize for DecoderLocation
impl StructuralPartialEq for DecoderLocation
Auto Trait Implementations§
impl Freeze for DecoderLocation
impl RefUnwindSafe for DecoderLocation
impl Send for DecoderLocation
impl Sync for DecoderLocation
impl Unpin for DecoderLocation
impl UnsafeUnpin for DecoderLocation
impl UnwindSafe for DecoderLocation
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