pub struct Context { /* private fields */ }Expand description
Implementations§
Source§impl Context
impl Context
Sourcepub fn builder() -> ContextBuilder
pub fn builder() -> ContextBuilder
Return a Context -Builder_.
Sourcepub fn registration(&self) -> Option<&Uuid>
pub fn registration(&self) -> Option<&Uuid>
Return registration (a UUID) if set; None otherwise.
Sourcepub fn instructor(&self) -> Option<&Actor>
pub fn instructor(&self) -> Option<&Actor>
Return instructor if set; None otherwise.
Sourcepub fn context_activities(&self) -> Option<&ContextActivities>
pub fn context_activities(&self) -> Option<&ContextActivities>
Return context_activities if set; None otherwise.
Sourcepub fn context_agents(&self) -> Option<&[ContextAgent]>
pub fn context_agents(&self) -> Option<&[ContextAgent]>
Return context_agents if set; None otherwise.
Sourcepub fn context_groups(&self) -> Option<&[ContextGroup]>
pub fn context_groups(&self) -> Option<&[ContextGroup]>
Return context_groups if set; None otherwise.
Sourcepub fn language(&self) -> Option<&MyLanguageTag>
pub fn language(&self) -> Option<&MyLanguageTag>
Return language if set; None otherwise.
Sourcepub fn language_as_str(&self) -> Option<&str>
pub fn language_as_str(&self) -> Option<&str>
Return language as string reference if set; None otherwise.
Sourcepub fn statement(&self) -> Option<&StatementRef>
pub fn statement(&self) -> Option<&StatementRef>
Return statement if set; None otherwise.
Sourcepub fn extensions(&self) -> Option<&Extensions>
pub fn extensions(&self) -> Option<&Extensions>
Return extensions if set; None otherwise.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Fingerprint for Context
impl Fingerprint for Context
Source§impl Validate for Context
impl Validate for Context
Source§fn validate(&self) -> Vec<ValidationError>
fn validate(&self) -> Vec<ValidationError>
Validate the instance and return a potentially empty collection of
ValidationError.
Source§fn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Convenience method to quickly assert if the type implementing this
trait is indeed valid. Read more
Source§fn check_validity(&self) -> Result<(), ValidationError>
fn check_validity(&self) -> Result<(), ValidationError>
Convenience method that checks the validity of a Validate instance and
raises a ValidationError if it was found to be invalid.
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.