pub struct Concept {
pub id: ConceptId,
pub path: PathBuf,
pub document: Document,
}Expand description
A single concept within a bundle (one markdown document).
Fields§
§id: ConceptIdThe concept’s id (path minus .md).
path: PathBufThe file path on disk.
document: DocumentThe parsed document.
Implementations§
Source§impl Concept
impl Concept
Sourcepub fn display_title(&self) -> String
pub fn display_title(&self) -> String
The concept’s title, falling back to the final segment of its id when
none is given, as the spec permits.
Sourcepub fn trust_tier(&self) -> TrustTier
pub fn trust_tier(&self) -> TrustTier
The trust tier derived from verified.
Sourcepub fn is_stale_at(&self, now: DateTime) -> bool
pub fn is_stale_at(&self, now: DateTime) -> bool
Whether this concept is stale at now: now >= stale_after.
Sourcepub fn is_stale_on(&self, today: Date) -> bool
pub fn is_stale_on(&self, today: Date) -> bool
Whether today >= stale_after.
Sourcepub fn attested_computation(&self) -> Option<AttestedComputation>
pub fn attested_computation(&self) -> Option<AttestedComputation>
The Attested Computation contract, when this concept is one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Concept
impl RefUnwindSafe for Concept
impl Send for Concept
impl Sync for Concept
impl Unpin for Concept
impl UnsafeUnpin for Concept
impl UnwindSafe for Concept
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