Enum NoEffect
pub enum NoEffect {}Expand description
The vocabulary of a surface that has no effects.
Trait Implementations§
§impl Effect for NoEffect
impl Effect for NoEffect
§const OPERATION: &'static str = "tilo.no-effect"
const OPERATION: &'static str = "tilo.no-effect"
The operation type every effect of the vocabulary travels under:
unique per vocabulary, like a resource’s kind.
§fn declarations() -> Vec<EffectDecl>
fn declarations() -> Vec<EffectDecl>
One declaration per effect, in order.
§fn arguments(&self) -> Map<String, Value>
fn arguments(&self) -> Map<String, Value>
This effect’s arguments, named as its declaration’s parameters.
§fn decode(
id: &str,
_: &Map<String, Value>,
) -> Result<NoEffect, EffectDecodeError>
fn decode( id: &str, _: &Map<String, Value>, ) -> Result<NoEffect, EffectDecodeError>
The effect
id with arguments, as a caller invoked it.§const APP_ID: &'static str = crate::kind::DEFAULT_APP
const APP_ID: &'static str = crate::kind::DEFAULT_APP
The app whose resource offers the vocabulary’s effects, which an
effect’s typed reference names its action by: defaults to none of its
own, for a vocabulary that is not an app’s (a test’s, a host’s).
§const LABEL: &'static str = Self::OPERATION
const LABEL: &'static str = Self::OPERATION
The vocabulary’s name, as its effects are labelled when they are
offered on their own.
§fn declaration(id: &str) -> Option<EffectDecl>
fn declaration(id: &str) -> Option<EffectDecl>
The declaration of the effect
id, built alone: what binding one
effect to an item reads, so offering it on many items costs one
declaration each, not the whole vocabulary.§fn confirmation_phrase(&self) -> Option<String>
fn confirmation_phrase(&self) -> Option<String>
What its caller types to confirm this invocation, when its effect
declares
phrase: the name of what it erases.§fn kind() -> ResourceKind
fn kind() -> ResourceKind
The kind the vocabulary’s effects are published under, which a typed
reference to one names: the operation they travel as, the vocabulary’s
name, and the app that offers it.
§fn key(&self) -> ActionKey
fn key(&self) -> ActionKey
The key this effect is offered under: the app that offers the
vocabulary, the operation its effects travel as, and this effect’s id.
§fn spec(id: &str) -> Option<ActionSpec>
fn spec(id: &str) -> Option<ActionSpec>
The spec
id declares: what a control binding it reads, so binding one
effect costs one declaration rather than the vocabulary’s.§fn specs() -> Vec<ActionSpec>
fn specs() -> Vec<ActionSpec>
The published action of every effect offered on the resource: all
but the
row ones, which are offered only bound.§fn bound(&self) -> ActionSpec
fn bound(&self) -> ActionSpec
This effect with its arguments as one action that takes none: what a
published child or a live row offers (open this snippet, stop
this process), answered by the vocabulary’s handler like any other
invocation of the effect, under the same contract as its
declaration.
§fn bound_asking(&self, asking: &[&str]) -> ActionSpec
fn bound_asking(&self, asking: &[&str]) -> ActionSpec
This effect bound to the item it acts on, as
bound,
still asking its caller for the arguments named in asking: rename
this file, to a name the caller gives. The bound arguments are this
effect’s own; an asked one the caller supplies replaces it.§fn bound_asking_params(&self, params: Vec<ActionParam>) -> ActionSpec
fn bound_asking_params(&self, params: Vec<ActionParam>) -> ActionSpec
bound_asking with the asked parameters given
whole, narrowed for this item: the applications that can open this
file as the choices of app.§fn item_specs(field: &str, item: &Id) -> Vec<ActionSpec>
fn item_specs(field: &str, item: &Id) -> Vec<ActionSpec>
The effects offered on the item
item of the collection field
(#[effect(item = field)]), each with its first parameter bound to
the item and the rest still asked.§fn address_on(&self, resource: impl Into<String>) -> ActionAddress
fn address_on(&self, resource: impl Into<String>) -> ActionAddress
This effect as the published resource
resource offers it (the
record, or a child or live row it is bound on, by its published id):
what a search hit invokes or a caller addresses through the host’s
door. Its id comes from the effect itself.§fn from_payload(payload: &[u8]) -> Result<Self, EffectDecodeError>
fn from_payload(payload: &[u8]) -> Result<Self, EffectDecodeError>
Decode one invocation’s payload, as the operation’s specs encode it.
impl Copy for NoEffect
Auto Trait Implementations§
impl Freeze for NoEffect
impl RefUnwindSafe for NoEffect
impl Send for NoEffect
impl Sync for NoEffect
impl Unpin for NoEffect
impl UnsafeUnpin for NoEffect
impl UnwindSafe for NoEffect
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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