pub struct PresentationSheaf {
pub source: Value,
pub presentations: Vec<Presentation>,
pub condition: SheafCondition,
}Expand description
A presentation sheaf — a value plus its presentations across modalities.
The sheaf condition is that all presentations agree on the
underlying value. This is checked by PresentationSheaf::check(),
which verifies that every presentation maps back to the same
source value.
Fields§
§source: ValueThe source value being presented.
presentations: Vec<Presentation>The presentations across modalities.
condition: SheafConditionThe sheaf condition — verifies presentations agree.
Implementations§
Source§impl PresentationSheaf
impl PresentationSheaf
Sourcepub fn add(&mut self, presentation: Presentation) -> &mut Self
pub fn add(&mut self, presentation: Presentation) -> &mut Self
Add a presentation to the sheaf.
Sourcepub fn for_modality(&self, modality: PresentationModality) -> Vec<&Presentation>
pub fn for_modality(&self, modality: PresentationModality) -> Vec<&Presentation>
Get all presentations for a specific modality.
Sourcepub fn modalities(&self) -> Vec<PresentationModality>
pub fn modalities(&self) -> Vec<PresentationModality>
Check which modalities are present.
Trait Implementations§
Source§impl Clone for PresentationSheaf
impl Clone for PresentationSheaf
Auto Trait Implementations§
impl Freeze for PresentationSheaf
impl RefUnwindSafe for PresentationSheaf
impl Send for PresentationSheaf
impl Sync for PresentationSheaf
impl Unpin for PresentationSheaf
impl UnsafeUnpin for PresentationSheaf
impl UnwindSafe for PresentationSheaf
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