pub struct VerbScope { /* private fields */ }Expand description
What a handler may read and change: the caller’s own agenda items — for an agent, only its own area’s — and moving one’s wake later (spec 3.3 §2 item 7, S-I8).
It holds no handle to the approval service, the agent table, standing rules, modes or governance:
// A handler cannot reach the inbox.
scope.approvals().decide("apr_1", 1, todo!()).await;Implementations§
Source§impl VerbScope
impl VerbScope
Sourcepub fn subject(&self) -> &SubjectRef
pub fn subject(&self) -> &SubjectRef
The person whose items these are.
Sourcepub fn area(&self) -> Option<&PartitionId>
pub fn area(&self) -> Option<&PartitionId>
The area an agent’s call is confined to; None for a person, who sees every area.
Sourcepub fn offset(&self) -> FixedOffset
pub fn offset(&self) -> FixedOffset
The offset times are shown at.
Sourcepub fn time_text(&self, at: DateTime<Utc>) -> String
pub fn time_text(&self, at: DateTime<Utc>) -> String
at as a person reads it: “19:00” today, “Tue 18:00” on another day.
Sourcepub async fn item(&self, id: &str) -> Result<AgendaItem, VerbError>
pub async fn item(&self, id: &str) -> Result<AgendaItem, VerbError>
The item id, when it is the caller’s (and in the agent’s area).
§Errors
VerbError::NotFound for an item that does not exist or is not the caller’s — the
same answer, so a caller learns nothing of other people’s items (S-I8).
Sourcepub async fn move_wake(
&self,
id: &str,
from: DateTime<Utc>,
to: DateTime<Utc>,
) -> Result<AgendaItem, VerbError>
pub async fn move_wake( &self, id: &str, from: DateTime<Utc>, to: DateTime<Utc>, ) -> Result<AgendaItem, VerbError>
Moves item id’s one wake from from to the later to, the only change a screen
action makes: the item stays scheduled; only when it wakes changes.
§Errors
VerbError::NotFound for an item not the caller’s; VerbError::Refused when it is
not scheduled, does not wait for one time, does not wait for from any more (“It moved
since you saw this”), to is not later than from, it ends before to, or its process
started; the kernel’s error.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for VerbScope
impl !UnwindSafe for VerbScope
impl Forget for VerbScope
impl Freeze for VerbScopewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<dyn AgendaAccess> is !null: Freeze,
PhantomData<ArcInner<dyn AgendaAccess>>: Freeze,
NonZero<i32>: Freeze,
Utc: Freeze,
*const ArcInner<Mutex<()>> is !null: Freeze,
PhantomData<ArcInner<Mutex<()>>>: Freeze,
impl Move for VerbScope
impl Send for VerbScope
impl Sync for VerbScope
impl Unpin for VerbScope
impl UnsafeUnpin for VerbScopewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn AgendaAccess> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn AgendaAccess>>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
*const ArcInner<Mutex<()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<()>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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