pub struct Assertion { /* private fields */ }Expand description
One authored assertion and its optional complete source override.
Implementations§
Source§impl Assertion
impl Assertion
Sourcepub fn new(key: AssertionKey) -> Self
pub fn new(key: AssertionKey) -> Self
Create an assertion with ordinary document provenance only.
Sourcepub fn key(&self) -> &AssertionKey
pub fn key(&self) -> &AssertionKey
Its document, carrier and expanded fact identity.
Sourcepub fn detail(&self) -> Vec<&AssertionSource>
pub fn detail(&self) -> Vec<&AssertionSource>
Persisted claims other than the document source.
Sourcepub fn source_override(&self) -> Option<&[AssertionSource]>
pub fn source_override(&self) -> Option<&[AssertionSource]>
The explicit source override, if one was recorded in the document.
Sourcepub fn add_detail(
&mut self,
source: AssertionSource,
) -> Result<(), MetadataError>
pub fn add_detail( &mut self, source: AssertionSource, ) -> Result<(), MetadataError>
Add a compiler or author claim once. Document provenance is derived solely from the assertion owner and cannot be supplied as extra detail.
Sourcepub fn sources(&self) -> Vec<AssertionSource>
pub fn sources(&self) -> Vec<AssertionSource>
Sources visible to a query. The document is implicit only without an override.
Trait Implementations§
impl Eq for Assertion
impl StructuralPartialEq for Assertion
Auto Trait Implementations§
impl Freeze for Assertion
impl RefUnwindSafe for Assertion
impl Send for Assertion
impl Sync for Assertion
impl Unpin for Assertion
impl UnsafeUnpin for Assertion
impl UnwindSafe for Assertion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.