pub struct VerbSurface {
pub id: String,
pub name: String,
pub label: String,
pub description: Option<String>,
pub kind: ActionKind,
pub destructive: bool,
pub incoming_message: bool,
pub params: Vec<ParamSurface>,
pub returns: Option<ReturnsSurface>,
pub writes: Vec<String>,
pub field: Option<String>,
pub tags: Vec<String>,
}Expand description
One verb.
Fields§
§id: String§name: StringThe name the action API offers this action by, where that is not id: a tilolang app
offers its actions by the name its code declares (new_note), while a change of one
claims the id the declaration keeps (qymo5lg2), which is what a receiver holding the
surface decides it by. Empty where the two are the same, as for a native verb.
label: String§description: Option<String>§kind: ActionKind§destructive: bool§incoming_message: boolIt records a message someone received, so an incoming-message
trigger fires on its changes
(INCOMING_MESSAGE_TAG).
params: Vec<ParamSurface>Left out of a surface file when it takes none.
returns: Option<ReturnsSurface>What it answers its caller with, when it answers a value: a read effect’s fields, a verb’s record. Absent when it answers nothing or a job.
writes: Vec<String>The units it writes (tilo_resource::footprint), when more than the
record unit.
field: Option<String>The field it sits under in the tree (#[action(field = "...")]): a
comment verb under the comments it writes.
The tags its declaration carries (crate::SECRET_ANSWER_TAG): what a host reading the
surface knows of the action without running the app.
Implementations§
Source§impl VerbSurface
impl VerbSurface
Sourcepub fn offered(&self) -> &str
pub fn offered(&self) -> &str
The name the action API offers this action by: Self::name, or Self::id where the
two are the same.
Trait Implementations§
Source§impl Clone for VerbSurface
impl Clone for VerbSurface
Source§fn clone(&self) -> VerbSurface
fn clone(&self) -> VerbSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerbSurface
impl Debug for VerbSurface
Source§impl<'de> Deserialize<'de> for VerbSurface
impl<'de> Deserialize<'de> for VerbSurface
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerbSurface, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerbSurface, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for VerbSurface
impl PartialEq for VerbSurface
Source§impl Serialize for VerbSurface
impl Serialize for VerbSurface
Source§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,
impl StructuralPartialEq for VerbSurface
Auto Trait Implementations§
impl Forget for VerbSurface
impl Freeze for VerbSurface
impl Move for VerbSurface
impl RefUnwindSafe for VerbSurface
impl Send for VerbSurface
impl Sync for VerbSurface
impl Unpin for VerbSurface
impl UnsafeUnpin for VerbSurface
impl UnwindSafe for VerbSurface
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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