pub struct DirectiveResult<S: State> {
pub state: S,
pub directives: Vec<Directive>,
}Expand description
Result combining state update and zero or more directives.
Agent nodes return this to indicate both immediate state changes and deferred effects to be executed by the runtime.
Fields§
§state: SUpdated state (applied immediately).
directives: Vec<Directive>Deferred effect descriptions (executed by runtime).
Implementations§
Source§impl<S: State> DirectiveResult<S>
impl<S: State> DirectiveResult<S>
Sourcepub const fn state_only(state: S) -> Self
pub const fn state_only(state: S) -> Self
Create a result with only state, no directives.
Sourcepub fn with_directive(state: S, directive: Directive) -> Self
pub fn with_directive(state: S, directive: Directive) -> Self
Create a result with state and a single directive.
Sourcepub const fn with_directives(state: S, directives: Vec<Directive>) -> Self
pub const fn with_directives(state: S, directives: Vec<Directive>) -> Self
Create a result with state and multiple directives.
Trait Implementations§
Source§impl<S: Clone + State> Clone for DirectiveResult<S>
impl<S: Clone + State> Clone for DirectiveResult<S>
Source§fn clone(&self) -> DirectiveResult<S>
fn clone(&self) -> DirectiveResult<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<S> Freeze for DirectiveResult<S>where
S: Freeze,
impl<S> !RefUnwindSafe for DirectiveResult<S>
impl<S> Send for DirectiveResult<S>
impl<S> Sync for DirectiveResult<S>
impl<S> Unpin for DirectiveResult<S>where
S: Unpin,
impl<S> UnsafeUnpin for DirectiveResult<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for DirectiveResult<S>
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