pub struct PickerContributions { /* private fields */ }Expand description
OR.5b: the specs a guest declared during register-picker-sources.
Recorded on the plugin’s PluginState and drained by the actor spawn after
the export returns — the GrammarContributions / ModeContributions shape,
and for the same reason: a guest registers by calling, so the host needs
somewhere for those calls to land before it knows how many there were.
Implementations§
Source§impl PickerContributions
impl PickerContributions
Sourcepub fn push(&mut self, spec: PickerSourceSpec)
pub fn push(&mut self, spec: PickerSourceSpec)
Record one declared source.
A repeat of an id this plugin already declared REPLACES it rather than appending: a guest that registers twice under one name means the second one, and appending would register two generators the registry then resolves by insertion order — which is a coin flip dressed as a rule.
Sourcepub fn take(&mut self) -> Vec<PickerSourceSpec>
pub fn take(&mut self) -> Vec<PickerSourceSpec>
Take everything declared, leaving the store empty.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for PickerContributions
impl Debug for PickerContributions
Source§impl Default for PickerContributions
impl Default for PickerContributions
Source§fn default() -> PickerContributions
fn default() -> PickerContributions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PickerContributions
impl RefUnwindSafe for PickerContributions
impl Send for PickerContributions
impl Sync for PickerContributions
impl Unpin for PickerContributions
impl UnsafeUnpin for PickerContributions
impl UnwindSafe for PickerContributions
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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