pub struct SourceDisciplines { /* private fields */ }Expand description
The disciplines a run’s sources play, as the session declared them.
The engine constructs this from the evidence session and registers it for the duration of one run, replacing any host-registered copy. Capabilities find it in the service registry. A source without an entry declares no discipline; that is unknown, never “no discipline matches”.
Implementations§
Source§impl SourceDisciplines
impl SourceDisciplines
Sourcepub fn new(
disciplines: impl IntoIterator<Item = (SourceId, Discipline)>,
) -> Self
pub fn new( disciplines: impl IntoIterator<Item = (SourceId, Discipline)>, ) -> Self
Declares disciplines, by source.
Capability tests construct it; a run always uses the runtime’s own.
Sourcepub fn of(&self, source: &SourceId) -> Option<&Discipline>
pub fn of(&self, source: &SourceId) -> Option<&Discipline>
The discipline declared for source, if any.
Sourcepub fn origin(&self, source: &SourceId) -> Option<&DisciplineOrigin>
pub fn origin(&self, source: &SourceId) -> Option<&DisciplineOrigin>
Where source’s discipline came from, if it has one.
Trait Implementations§
Source§impl Clone for SourceDisciplines
impl Clone for SourceDisciplines
Source§impl Debug for SourceDisciplines
impl Debug for SourceDisciplines
Auto Trait Implementations§
impl Freeze for SourceDisciplines
impl RefUnwindSafe for SourceDisciplines
impl Send for SourceDisciplines
impl Sync for SourceDisciplines
impl Unpin for SourceDisciplines
impl UnsafeUnpin for SourceDisciplines
impl UnwindSafe for SourceDisciplines
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