Enum TextAssistancePrefsAction
pub enum TextAssistancePrefsAction {
FieldEdit(Edit<TextAssistancePrefs>),
}Expand description
The replayable actions of TextAssistancePrefs, one per #[action] method.
Variants§
FieldEdit(Edit<TextAssistancePrefs>)
A field edit: a path into the record and an operation.
Trait Implementations§
§impl Clone for TextAssistancePrefsAction
impl Clone for TextAssistancePrefsAction
§fn clone(&self) -> TextAssistancePrefsAction
fn clone(&self) -> TextAssistancePrefsAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TextAssistancePrefsAction
impl Debug for TextAssistancePrefsAction
§impl<'de> Deserialize<'de> for TextAssistancePrefsAction
impl<'de> Deserialize<'de> for TextAssistancePrefsAction
§fn deserialize<D>(
deserializer: D,
) -> Result<TextAssistancePrefsAction, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<TextAssistancePrefsAction, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Operation for TextAssistancePrefsAction
impl Operation for TextAssistancePrefsAction
type Record = TextAssistancePrefs
§fn edit(&self) -> Option<&Edit<TextAssistancePrefs>>
fn edit(&self) -> Option<&Edit<TextAssistancePrefs>>
The field edit this operation is, when it is one: it applies at its
path instead of through [
Self::perform].§fn kind(&self) -> ActionKind
fn kind(&self) -> ActionKind
What this operation can do.
#[resource] derives it from each
verb’s signature.§fn field_edit(
edit: Edit<TextAssistancePrefs>,
) -> Option<TextAssistancePrefsAction>
fn field_edit( edit: Edit<TextAssistancePrefs>, ) -> Option<TextAssistancePrefsAction>
The field edit
edit as an operation of the record.§fn perform(
&self,
_record: &mut TextAssistancePrefs,
_cx: &mut ActionCx,
) -> Result<(), Refusal>
fn perform( &self, _record: &mut TextAssistancePrefs, _cx: &mut ActionCx, ) -> Result<(), Refusal>
Run the operation’s method on the record. Read more
§fn snapshot(record: &TextAssistancePrefs) -> Option<TextAssistancePrefs>
fn snapshot(record: &TextAssistancePrefs) -> Option<TextAssistancePrefs>
A copy of
record, so the next action can start from it rather than
read the whole record from the document again. #[resource]
generates it for a Clone record; without one (the default) every
action reads the record whole.§fn risk(&self) -> RiskLevel
fn risk(&self) -> RiskLevel
The consequence class of this operation.
#[resource] generates it
from #[action(destructive)], so the
same method reached through the generic apply action is confirmed
exactly as its named declaration is.§fn writes(&self) -> Writes
fn writes(&self) -> Writes
The units this operation may write beside the record unit (see
[
crate::footprint]). #[resource] generates it: an item verb its
item, #[action(writes = field)] the fields named.§fn change_kind(&self) -> ChangeKind
fn change_kind(&self) -> ChangeKind
What the operation is to the people sharing the record: content,
housekeeping about it, or content from outside that is nobody’s undo
step.
#[resource] generates it from #[action(housekeeping)] and
#[action(external)].§fn incoming_message(&self) -> bool
fn incoming_message(&self) -> bool
Whether the operation records a message someone received.
#[resource] generates it from #[action(incoming_message)].§fn compensates(&self) -> bool
fn compensates(&self) -> bool
Whether this operation declares the verb that undoes it
(
#[action(undo = path)]).§const QUEUES: bool = false
const QUEUES: bool = false
Whether every change of the record may queue an outside consequence
(
#[resource(queue = path)]): [Self::queue] runs after each.§fn queue(record: &mut Self::Record, before: &Self::Record, cx: &mut ActionCx)
fn queue(record: &mut Self::Record, before: &Self::Record, cx: &mut ActionCx)
Queue in the record’s outboxes what the change from
before to
record must do outside (#[resource(queue = path)]).§fn perform_item(
&self,
doc: &mut AutoCommit,
cx: &mut ActionCx,
) -> Option<Result<(), Refusal>>
fn perform_item( &self, doc: &mut AutoCommit, cx: &mut ActionCx, ) -> Option<Result<(), Refusal>>
Apply an item method (
fn star(contact: &mut Contact)) to its item
alone in doc: read the item, run the method, write what changed.
None for any other operation, or where the record holds an
invariant of its own.§fn compensation(
&self,
before: &Self::Record,
after: &Self::Record,
minted: &[Id],
) -> Option<Result<Self, String>>
fn compensation( &self, before: &Self::Record, after: &Self::Record, minted: &[Id], ) -> Option<Result<Self, String>>
The verb that undoes this one, from the record before and after it
ran and the ids it minted (
#[action(undo = path)]). None when it
declares none: undo then reverts the document by inverse patches. Read more§impl Serialize for TextAssistancePrefsAction
impl Serialize for TextAssistancePrefsAction
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for TextAssistancePrefsAction
impl RefUnwindSafe for TextAssistancePrefsAction
impl Send for TextAssistancePrefsAction
impl Sync for TextAssistancePrefsAction
impl Unpin for TextAssistancePrefsAction
impl UnsafeUnpin for TextAssistancePrefsAction
impl UnwindSafe for TextAssistancePrefsAction
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> 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