Skip to main content

EffectStatus

Struct EffectStatus 

Source
pub struct EffectStatus { /* private fields */ }
Expand description

What an effect, or one of the resource’s own actions, looks like to callers right now, when it differs from its declaration: unavailable while the engine is offline, labelled “Stop recording” while recording.

Implementations§

Source§

impl EffectStatus

Source

pub fn unavailable<E, A>( effect: ActionRef<E, A>, code: impl Into<String>, reason: impl Into<String>, ) -> Self

effect cannot be invoked now: code names why for programs, reason for people.

Source

pub fn described<E, A>( effect: ActionRef<E, A>, description: impl Into<String>, ) -> Self

effect says of itself what description says on this entity, and is offered as declared otherwise.

Source

pub fn of_kind<E, A>(effect: ActionRef<E, A>, kind: ActionKind) -> Self

effect is kind on this entity, offered as declared otherwise.

Source

pub fn labelled<E, A>(effect: ActionRef<E, A>, label: impl Into<String>) -> Self

effect is offered as label now.

Source

pub fn with_param_choices<P, V>( self, param: P, choices: impl IntoIterator<Item = V>, ) -> Self
where P: Into<String>, V: Into<String>,

The effect’s parameter param accepts choices on this entity: the apps that open this file, the devices nearby now.

Source

pub fn with_labelled_param_choices<P, V, L>( self, param: P, choices: impl IntoIterator<Item = (V, L)>, ) -> Self
where P: Into<String>, V: Into<String>, L: Into<String>,

Self::with_param_choices, each choice with the words it reads by: a nearby device’s handle reads as the device’s name.

Source

pub fn with_param_description<P: Into<String>>( self, param: P, description: impl Into<String>, ) -> Self

The effect’s parameter param means description on this entity.

Source

pub fn with_param_schema<P: Into<String>>(self, param: P, schema: Value) -> Self

The effect’s parameter param is bounded by schema on this entity.

Source

pub fn on(self, item: impl Into<String>) -> Self

This status is about the item or row published as item rather than the resource its view publishes: the effect is offered as the status says on that entity’s published actions alone (a process that is a system service cannot be ended), served by a publisher’s row status.

Source

pub fn with_label(self, label: impl Into<String>) -> Self

Offer the effect as label too.

Source

pub fn with_description(self, description: impl Into<String>) -> Self

Say what the effect does on this entity right now, in the entity’s own words: what erasing this drive loses.

Source

pub fn with_phrase(self, phrase: impl Into<String>) -> Self

Have the caller type phrase to confirm this invocation on this entity: the name of what it erases.

Source

pub fn availability(&self) -> Option<&Availability>

How the effect stands now, when the status narrows it.

Source

pub fn description(&self) -> Option<&str>

What the effect says of itself on this entity, when the status says.

Source

pub fn phrase(&self) -> Option<&str>

What its caller types to confirm it on this entity, when the status asks for one.

Source

pub fn id(&self) -> &'static str

The id of the action or effect this status is about.

Source

pub fn item(&self) -> Option<&str>

The item or row this status is about, when it is about one rather than the published resource.

Source

pub fn overlay(&self, spec: &mut ActionSpec)

Show spec as this status says it is right now.

Trait Implementations§

Source§

impl Clone for EffectStatus

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 EffectStatus

Source§

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

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

impl PartialEq for EffectStatus

Source§

fn eq(&self, other: &Self) -> 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 EffectStatus

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