Skip to main content

RowBindings

Struct RowBindings 

Source
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

Source

pub fn new() -> Self

Source

pub fn bind<R, A, I, K>(self, effect: ActionRef<R, A>, arguments: I) -> Self
where I: IntoIterator<Item = (K, Value)>, K: Into<String>,

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.

Source

pub fn bind_id<I, K>(self, effect: &'static str, arguments: I) -> Self
where I: IntoIterator<Item = (K, Value)>, K: Into<String>,

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.

Source

pub fn bind_asking<R, A, I, K>( self, effect: ActionRef<R, A>, arguments: I, asking: &[&'static str], ) -> Self
where I: IntoIterator<Item = (K, Value)>, K: Into<String>,

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.

Source

pub fn bind_asking_id<I, K>( self, effect: &'static str, arguments: I, asking: &[&'static str], ) -> Self
where I: IntoIterator<Item = (K, Value)>, K: Into<String>,

Self::bind_asking of an effect known only when it invokes, by its id.

Source

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.

Source

pub fn offer_id(self, effect: &'static str) -> Self

Self::offer of an effect known only when it invokes, by its id.

Source

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.

Source

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.

Source

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).

Source

pub fn arguments(&self, effect: &str) -> Option<&[Map<String, Value>]>

The arguments the row gives the effect effect, once for each time it offers it: an effect offered twice with different arguments (each reviewed sign-in method) is two actions on the row.

Source

pub fn is_empty(&self) -> bool

Whether the row offers no effect of its type’s.

Trait Implementations§

Source§

impl Clone for RowBindings

Source§

fn clone(&self) -> Self

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 RowBindings

Source§

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

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

impl Default for RowBindings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

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

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