pub struct ModelSource { /* private fields */ }Expand description
Origin of a model’s code.
Registration records the model’s type path. The registering crate’s build is recorded once the entry joins a
model set, and the accessors that read it return empty text or None until then.
Implementations§
Source§impl ModelSource
impl ModelSource
Sourcepub fn build(&self) -> Option<&BuildInfo>
pub fn build(&self) -> Option<&BuildInfo>
Build of the registering crate, None until a set records it.
Sourcepub fn package(&self) -> &str
pub fn package(&self) -> &str
Package of the registering crate, empty until a set records its build.
Sourcepub fn version(&self) -> &str
pub fn version(&self) -> &str
Version of the registering crate, empty until a set records its build.
Sourcepub fn commit(&self) -> &str
pub fn commit(&self) -> &str
Short commit hash of the registering crate, as BuildInfo::commit returns it, and empty until a set
records its build.
Sourcepub fn dirty(&self) -> Option<bool>
pub fn dirty(&self) -> Option<bool>
Whether the registering crate’s sources, manifest or lockfile differed from its commit, as
BuildInfo::dirty returns it.
Sourcepub fn source_hash(&self) -> Option<u64>
pub fn source_hash(&self) -> Option<u64>
Hash of the registering crate’s files, as BuildInfo::source_hash returns it.
Trait Implementations§
Source§impl Clone for ModelSource
impl Clone for ModelSource
Source§impl Debug for ModelSource
impl Debug for ModelSource
impl Eq for ModelSource
Source§impl PartialEq for ModelSource
impl PartialEq for ModelSource
impl StructuralPartialEq for ModelSource
Auto Trait Implementations§
impl Freeze for ModelSource
impl RefUnwindSafe for ModelSource
impl Send for ModelSource
impl Sync for ModelSource
impl Unpin for ModelSource
impl UnsafeUnpin for ModelSource
impl UnwindSafe for ModelSource
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