pub struct ProviderViewRefreshRequested {
pub provider: String,
pub args: Vec<String>,
}Expand description
“re-open the view I own, with these arguments” — asked for
from somewhere that holds no activator and returns no
Effect (OA.15a).
§Why an effect was not enough
AppEffect::OpenProviderView
already says this, and every trigger that can return an effect
should keep using it. What it cannot serve is a producer that is not
running inside a trigger at all: a plugin’s on-event handler
returns () by construction (wit/types.wit’s event seam is
observation-shaped), and a background task holds neither the
dispatcher nor the activator.
The first consumer is the one that made the gap visible. A guest
mode’s activation is delivered as minor-activated, and a guest mode
has no lifecycle body of its own to hang behaviour on — PluginMode
is data with a no-op on_activate (mode_host.rs). So a plugin
whose mode is supposed to CHANGE ITS VIEW could observe the
activation and do nothing about it, which makes such a mode a label
rather than a switch.
§The enable-mode precedent, one step further
Event::ModeEnablementRequested is the same shape: the guest cannot
reach the activator, so the call is a REQUEST and the Editor applies
it. This is that pattern for views, with one deliberate difference —
it is a typed event, so BootContext::wake_on_event covers it
and the re-scan reaches the screen with no keystroke. A request that
only landed on the next keypress would reproduce, exactly, the
“works, but only after I hit something” class this codebase has paid
for repeatedly.
Fields§
§provider: StringThe provider name, as registered in ProviderViewRegistry.
args: Vec<String>The view arguments, verbatim. Routed, never read: they are the
provider’s own vocabulary, the same contract scan_args carries.
Trait Implementations§
Source§impl Clone for ProviderViewRefreshRequested
impl Clone for ProviderViewRefreshRequested
Source§fn clone(&self) -> ProviderViewRefreshRequested
fn clone(&self) -> ProviderViewRefreshRequested
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderViewRefreshRequested
impl Debug for ProviderViewRefreshRequested
impl Eq for ProviderViewRefreshRequested
Source§impl Event for ProviderViewRefreshRequested
impl Event for ProviderViewRefreshRequested
Source§fn event_type_id(&self) -> EventTypeId
fn event_type_id(&self) -> EventTypeId
static to avoid
re-allocating the metadata on every call. The macro
register_event! generates this for you.impl StructuralPartialEq for ProviderViewRefreshRequested
Auto Trait Implementations§
impl Freeze for ProviderViewRefreshRequested
impl RefUnwindSafe for ProviderViewRefreshRequested
impl Send for ProviderViewRefreshRequested
impl Sync for ProviderViewRefreshRequested
impl Unpin for ProviderViewRefreshRequested
impl UnsafeUnpin for ProviderViewRefreshRequested
impl UnwindSafe for ProviderViewRefreshRequested
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.