pub struct RowBindings { /* private fields */ }Expand description
The arguments a row sets for the effects it offers, by effect id.
A row of a declared type offers the effects its type declares on rows
(#[effect(on = Row)]), and knows from its own state what those effects
act on: a saved network knows the profile it keeps and whether forging it
once more means going through its proxy. Each effect the row names is
offered on it with exactly the arguments it gives bound; an effect it
does not name is not offered (RowBindings::new() offers none, and
LiveRow::typed offers every declared one with just the id bound).
Implementations§
Source§impl RowBindings
impl RowBindings
pub fn new() -> Self
Sourcepub fn bind<R, A, I, K>(self, effect: ActionRef<R, A>, arguments: I) -> Self
pub fn bind<R, A, I, K>(self, effect: ActionRef<R, A>, arguments: I) -> Self
Offer the effect effect on the row, with arguments bound: the
effect’s declaration’s parameters, each by the name it declares.
Names the effect does not take are dropped.
Sourcepub fn bind_id<I, K>(self, effect: &'static str, arguments: I) -> Self
pub fn bind_id<I, K>(self, effect: &'static str, arguments: I) -> Self
Self::bind_id of an effect known only when it invokes, by the id it
answers to: the arguments its declaration takes, named as it names
them. Names the effect does not take are dropped.
Sourcepub fn bind_asking<R, A, I, K>(
self,
effect: ActionRef<R, A>,
arguments: I,
asking: &[&'static str],
) -> Self
pub fn bind_asking<R, A, I, K>( self, effect: ActionRef<R, A>, arguments: I, asking: &[&'static str], ) -> Self
Offer effect on the row with arguments as the values it would act
with, still asking the parameters asking names: what the row’s own
state knows the effect would act with unless its caller gives another
(the model agents use now, the protocol this provider speaks). The
arguments asking does not name are bound and not asked.
Sourcepub fn bind_asking_id<I, K>(
self,
effect: &'static str,
arguments: I,
asking: &[&'static str],
) -> Self
pub fn bind_asking_id<I, K>( self, effect: &'static str, arguments: I, asking: &[&'static str], ) -> Self
Self::bind_asking of an effect known only when it invokes, by its
id.
Sourcepub fn offer<R, A>(self, effect: ActionRef<R, A>) -> Self
pub fn offer<R, A>(self, effect: ActionRef<R, A>) -> Self
Offer effect on the row with nothing bound: every argument of it is
asked from whoever invokes it.
Sourcepub fn offer_id(self, effect: &'static str) -> Self
pub fn offer_id(self, effect: &'static str) -> Self
Self::offer of an effect known only when it invokes, by its id.
Sourcepub fn extended(self, other: &Self) -> Self
pub fn extended(self, other: &Self) -> Self
Offer beside what the row already offers, other’s: two effects a
row’s own state knows separately are one row’s bindings.
Sourcepub fn choices<R, A>(
self,
effect: ActionRef<R, A>,
param: &'static str,
choices: impl IntoIterator<Item = String>,
) -> Self
pub fn choices<R, A>( self, effect: ActionRef<R, A>, param: &'static str, choices: impl IntoIterator<Item = String>, ) -> Self
Offer the parameter param of effect, which the row offers, with
the values the row’s state knows it takes (a display’s modes, the
scales it supports): what a control or the palette lists.
Sourcepub fn spec(self, spec: ActionSpec) -> Self
pub fn spec(self, spec: ActionSpec) -> Self
Offer spec on the row as it is: an action another resource declares,
which the row was given rather than declaring it itself (a settings
section’s edit, the open of an installed app), or one the row’s window
shapes from its own state for a single entity it names (a form the page
asks, the departure it holds).
Trait Implementations§
Source§impl Clone for RowBindings
impl Clone for RowBindings
Source§impl Debug for RowBindings
impl Debug for RowBindings
Auto Trait Implementations§
impl !RefUnwindSafe for RowBindings
impl !UnwindSafe for RowBindings
impl Forget for RowBindings
impl Freeze for RowBindings
impl Move for RowBindings
impl Send for RowBindings
impl Sync for RowBindings
impl Unpin for RowBindings
impl UnsafeUnpin for RowBindings
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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