#[non_exhaustive]pub enum Origin {
InMemory,
File {
path: String,
format: String,
hash: Option<String>,
retained_source: bool,
},
Folder {
path: String,
format: String,
file_hashes: BTreeMap<String, String>,
},
BinaryFile {
path: String,
format: String,
hash: Option<String>,
decoded_sections: Vec<String>,
},
Derived {
parent_package_id: Option<String>,
pass: String,
options: Map<String, Value>,
},
Composite {
sources: Vec<String>,
},
}Expand description
Where the package came from. Internally tagged on kind in JSON, so a reader
distinguishes an in-memory model, a single text file (with or without
retained source), a folder dataset, a partially decoded binary, a derived
product of a lowering pass, or a composite of several sources.
The hash field is named consistently across all Origin variants.
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.
InMemory
Built in process, no source artifact.
File
Fields
Folder
BinaryFile
Derived
A model produced by a lowering/normalization pass from another package.
Composite
Several sources combined, e.g. a static case plus a profile set.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Origin
impl<'de> Deserialize<'de> for Origin
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 Origin
impl StructuralPartialEq for Origin
Auto Trait Implementations§
impl Freeze for Origin
impl RefUnwindSafe for Origin
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnsafeUnpin for Origin
impl UnwindSafe for Origin
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more