pub struct Act {
pub address: String,
pub verb: String,
pub signer: String,
pub predecessors: Vec<String>,
pub recipients: BTreeSet<String>,
pub fields: BTreeMap<String, SExpr>,
pub message: Message,
}Expand description
An accepted message as the fold sees it (SPEC-019 Reference, “act”).
The signer is supplied by the host’s authentication gate, never read
from the payload. message is the complete received message, wrappers
included, so a store can be rebuilt from acts for the binder’s
verification step and the cast can be read from the root wrapper.
Fields§
§address: StringCanonical sealed-wrapper hash for causal role roots; simple-message hash otherwise.
verb: String§signer: String§predecessors: Vec<String>§recipients: BTreeSet<String>§fields: BTreeMap<String, SExpr>Keyword fields of the innermost simple message, routing keywords excluded.
message: MessageImplementations§
Source§impl Act
impl Act
Sourcepub fn from_message(message: Message, signer: &str) -> Result<Act, String>
pub fn from_message(message: Message, signer: &str) -> Result<Act, String>
View a received message as an act. signer is the authenticated
sender established by the host.
Sourcepub fn validate_identity(&self) -> Result<(), String>
pub fn validate_identity(&self) -> Result<(), String>
Check derived metadata against the message without cloning an owned Act. The signer remains host-supplied; this check does not authenticate it.
Trait Implementations§
impl Eq for Act
impl StructuralPartialEq for Act
Auto Trait Implementations§
impl Forget for Act
impl Freeze for Actwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
*const LeafNode<String, SetValZST> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, SetValZST)>>: Freeze,
*const LeafNode<String, SExpr> is !null: Freeze,
PhantomData<Box<(String, SExpr)>>: Freeze,
PhantomData<SExpr>: Freeze,
*const Message is !null: Freeze,
PhantomData<Message>: Freeze,
impl Move for Act
impl RefUnwindSafe for Act
impl Send for Act
impl Sync for Act
impl Unpin for Act
impl UnsafeUnpin for Actwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
*const LeafNode<String, SExpr> is !null: UnsafeUnpin,
PhantomData<Box<(String, SExpr)>>: UnsafeUnpin,
PhantomData<SExpr>: UnsafeUnpin,
*const Message is !null: UnsafeUnpin,
PhantomData<Message>: UnsafeUnpin,
impl UnwindSafe for Actwhere
RawVecInner: UnwindSafe,
BTreeMap<String, SetValZST>: UnwindSafe,
BTreeMap<String, SExpr>: UnwindSafe,
BoxRaw<Message>: UnwindSafe,
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