pub struct StandardContextHandler;Expand description
Standard context handler
Provides utilities for creating and managing execution contexts. This is a stateless handler that follows Layer 3 principles.
Implementations§
Source§impl StandardContextHandler
impl StandardContextHandler
Sourcepub fn create_effect_context(
&self,
authority_id: AuthorityId,
context_id: ContextId,
execution_mode: ExecutionMode,
) -> EffectContext
pub fn create_effect_context( &self, authority_id: AuthorityId, context_id: ContextId, execution_mode: ExecutionMode, ) -> EffectContext
Create an effect context.
Convenience for creating a context with only an authority.
Sourcepub fn validate_context(
&self,
context: &EffectContext,
required_fields: &[&str],
) -> bool
pub fn validate_context( &self, context: &EffectContext, required_fields: &[&str], ) -> bool
Validate context for required metadata fields.
Sourcepub fn merge_metadata(
&self,
contexts: &[&EffectContext],
) -> HashMap<String, String>
pub fn merge_metadata( &self, contexts: &[&EffectContext], ) -> HashMap<String, String>
Merge metadata from multiple contexts.
Trait Implementations§
Source§impl Clone for StandardContextHandler
impl Clone for StandardContextHandler
Source§fn clone(&self) -> StandardContextHandler
fn clone(&self) -> StandardContextHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StandardContextHandler
impl Debug for StandardContextHandler
Auto Trait Implementations§
impl Freeze for StandardContextHandler
impl RefUnwindSafe for StandardContextHandler
impl Send for StandardContextHandler
impl Sync for StandardContextHandler
impl Unpin for StandardContextHandler
impl UnsafeUnpin for StandardContextHandler
impl UnwindSafe for StandardContextHandler
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