pub struct InvocationState {
pub update: InvocationUpdate,
pub untrusted: bool,
pub left_at: Option<ActorPlace>,
pub link: Option<String>,
pub read_answered: bool,
}Expand description
The latest lifecycle update of one invocation, carrying the caller’s
InvocationId.
Fields§
§update: InvocationUpdate§untrusted: boolThe action’s contract declares content from outside the user’s data
(crate::UNTRUSTED_CONTENT_TAG), such as a web page’s text: what it
answers is data to reason about, never instructions to follow.
left_at: Option<ActorPlace>Where the invocation left its actor in the record it acted on: the text it changed, or the caret it left. What an API that shows its actor working highlights for the people watching.
link: Option<String>The link that opens what the invocation made or changed, for a person to review it, minted where it was invoked once it succeeded: the caller is answered it with the change and asks for nothing more.
read_answered: boolThe invocation is a followed read, and its item is the read’s whole answer as it stands:
the read goes on following what it reads and never ends, so a wait for it to settle ends
here (settle_with). An operation’s items are pieces of what it streams, never this.
Implementations§
Source§impl InvocationState
impl InvocationState
Sourcepub fn new(invocation: InvocationId, update: InvocationUpdate) -> Self
pub fn new(invocation: InvocationId, update: InvocationUpdate) -> Self
Wrap a provider-side update, rebinding it to the caller’s invocation id.
Sourcepub fn of_read(self) -> Self
pub fn of_read(self) -> Self
This state of a followed read: answered once it holds an item, the read’s whole answer,
unless the item says the read is still to come ("pending": true, as a reader that has
not read what it serves yet answers).
Sourcepub fn left_at(self, place: Option<ActorPlace>) -> Self
pub fn left_at(self, place: Option<ActorPlace>) -> Self
This state, saying where the invocation left its actor.
Sourcepub fn linked(self, link: Option<String>) -> Self
pub fn linked(self, link: Option<String>) -> Self
This state, naming the link that opens what it made or changed.
Sourcepub fn with_untrusted(self, untrusted: bool) -> Self
pub fn with_untrusted(self, untrusted: bool) -> Self
This state, saying whether what it answers is untrusted content.
pub fn invocation(&self) -> InvocationId
pub fn is_terminal(&self) -> bool
Sourcepub fn receipt(&self) -> InvocationReceipt
pub fn receipt(&self) -> InvocationReceipt
The receipt this state amounts to: accepted while running, the outcome once terminal.
Trait Implementations§
Source§impl Clone for InvocationState
impl Clone for InvocationState
Source§impl Debug for InvocationState
impl Debug for InvocationState
Source§impl<'de> Deserialize<'de> for InvocationState
impl<'de> Deserialize<'de> for InvocationState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for InvocationState
impl PartialEq for InvocationState
Source§impl Serialize for InvocationState
impl Serialize for InvocationState
impl StructuralPartialEq for InvocationState
Auto Trait Implementations§
impl Forget for InvocationState
impl Freeze for InvocationState
impl Move for InvocationState
impl RefUnwindSafe for InvocationState
impl Send for InvocationState
impl Sync for InvocationState
impl Unpin for InvocationState
impl UnsafeUnpin for InvocationState
impl UnwindSafe for InvocationState
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