pub struct LocalContexts { /* private fields */ }Expand description
The default owner, in process: frames declared by plugins, the stack written to a document inside each transition when given one.
Implementations§
Source§impl LocalContexts
impl LocalContexts
pub fn new() -> Self
Sourcepub fn with_persist(self, persist: Persist, document: &str) -> Self
pub fn with_persist(self, persist: Persist, document: &str) -> Self
Writes the stack to document under persist, inside each
transition (before answering and publishing).
Sourcepub fn set_persist(&mut self, persist: Option<Persist>, document: &str)
pub fn set_persist(&mut self, persist: Option<Persist>, document: &str)
Where it writes (None: nowhere).
Trait Implementations§
Source§impl Contexts for LocalContexts
impl Contexts for LocalContexts
Source§fn registry(&self) -> FrameRegistry
fn registry(&self) -> FrameRegistry
The frames that exist.
Source§fn request(&mut self, envelope: &Envelope, origin: &Origin) -> Answer
fn request(&mut self, envelope: &Envelope, origin: &Origin) -> Answer
Applies a transition, or refuses it. The owner writes the new
stack before it answers, then publishes (see
Contexts::take_events).Source§fn hold(
&mut self,
groups: Vec<GroupId>,
reason: &str,
by: &str,
) -> Result<u64, String>
fn hold( &mut self, groups: Vec<GroupId>, reason: &str, by: &str, ) -> Result<u64, String>
Holds groups (empty: everything;
PLACES for places): its
token.Source§fn declare(&mut self, owner: &OwnerId, spec: FrameSpec) -> Result<(), String>
fn declare(&mut self, owner: &OwnerId, spec: FrameSpec) -> Result<(), String>
A plugin declares a frame (
Ctx::frame).Source§fn remove_owner(&mut self, owner: &OwnerId)
fn remove_owner(&mut self, owner: &OwnerId)
A plugin is gone: its frames go.
Source§impl Debug for LocalContexts
impl Debug for LocalContexts
Source§impl Default for LocalContexts
impl Default for LocalContexts
Source§fn default() -> LocalContexts
fn default() -> LocalContexts
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LocalContexts
impl !RefUnwindSafe for LocalContexts
impl Send for LocalContexts
impl Sync for LocalContexts
impl Unpin for LocalContexts
impl UnsafeUnpin for LocalContexts
impl !UnwindSafe for LocalContexts
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.