pub struct VerbSurface {Show 15 fields
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>,
pub outside: Vec<String>,
pub notice: bool,
pub origin: Option<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.
outside: Vec<String>The outside capabilities its code can queue (smtp.send), as its outside(...) calls
name them: a change that writes an entry for one is admitted only from a verb that
declares it (a tilolang app’s surface), so what an app may reach beyond the workspace is
known before any of its code runs.
notice: boolWhether its code can tell a person something (notify(...)): a change that writes a
notice is admitted only from a verb that says so.
origin: Option<String>On the surface’s origin verb (crate::stamp::Stamp::ORIGIN_VERB): the outside
service kind the surface’s records are of, as its type declares it (imap.message).
None for every other verb, and for a surface whose records no service keeps in step.
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.
Sourcepub fn is_store_verb(&self) -> bool
pub fn is_store_verb(&self) -> bool
Whether the store writes this verb itself rather than an app declaring it as an action a
caller invokes: the framework’s content edit on every kind (CONTENT_VERBS) and the
store’s migration ([Stamp::MIGRATE_VERB]).
Sourcepub fn is_platform(&self) -> bool
pub fn is_platform(&self) -> bool
Whether this is the platform’s or the framework’s own verb rather than an action a
caller invokes: the store’s verbs (Self::is_store_verb), the names the platform
writes with $ ($create, $send, $settle), and the bound-control edits a host
declares without the prefix (edit-text, edit-flag).
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