pub trait Contexts {
// Required methods
fn registry(&self) -> FrameRegistry;
fn state(&self) -> State;
fn request(&mut self, envelope: &Envelope, origin: &Origin) -> Answer;
// Provided methods
fn rev(&self) -> u64 { ... }
fn holds(&self) -> Vec<Hold> { ... }
fn hold(
&mut self,
_groups: Vec<GroupId>,
_reason: &str,
_by: &str,
) -> Result<u64, String> { ... }
fn release(&mut self, _token: u64) -> bool { ... }
fn declare(
&mut self,
_owner: &OwnerId,
_spec: FrameSpec,
) -> Result<(), String> { ... }
fn remove_owner(&mut self, _owner: &OwnerId) { ... }
fn take_events(&mut self) -> Vec<(String, Json)> { ... }
}Expand description
The owner of the context stack, as the interface reaches it.
Required Methods§
Sourcefn registry(&self) -> FrameRegistry
fn registry(&self) -> FrameRegistry
The frames that exist.
Provided Methods§
Sourcefn 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.
Sourcefn 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).
Sourcefn remove_owner(&mut self, _owner: &OwnerId)
fn remove_owner(&mut self, _owner: &OwnerId)
A plugin is gone: its frames go.
Sourcefn take_events(&mut self) -> Vec<(String, Json)>
fn take_events(&mut self) -> Vec<(String, Json)>
The events to publish since the last call, as (name, data): egui-pop publishes them on the host’s journal. An owner publishing on its own bus gives none.