Skip to main content

ProviderViewRefreshRequested

Struct ProviderViewRefreshRequested 

Source
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: String

The 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

Source§

fn clone(&self) -> ProviderViewRefreshRequested

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProviderViewRefreshRequested

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ProviderViewRefreshRequested

Source§

impl Event for ProviderViewRefreshRequested

Source§

fn event_type_id(&self) -> EventTypeId

The type-id under which this event is registered. Implementors typically delegate to a static to avoid re-allocating the metadata on every call. The macro register_event! generates this for you.
Source§

impl PartialEq for ProviderViewRefreshRequested

Source§

fn eq(&self, other: &ProviderViewRefreshRequested) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ProviderViewRefreshRequested

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more