pub struct Delegation {
pub team: Option<String>,
pub to: PeerTarget,
pub task: String,
pub context: DelegationContext,
pub wait: Duration,
pub message_id: String,
pub requester: Option<UserRef>,
pub direct: bool,
}Expand description
A request to hand work to another bot.
Fields§
§team: Option<String>The team; None: any team of this bot with a matching member.
to: PeerTargetWhom.
task: StringThe work, in plain language.
context: DelegationContextWho it is for and what it may spend.
wait: DurationHow long to wait for the result before returning a running task.
message_id: StringIdentifies this request: sending it again returns the same task.
requester: Option<UserRef>Who asked, so a result that comes after a restart still reaches them.
direct: boolThe origin conversation is a one-to-one chat.
Trait Implementations§
Source§impl Clone for Delegation
impl Clone for Delegation
Source§impl Debug for Delegation
impl Debug for Delegation
impl Eq for Delegation
Source§impl PartialEq for Delegation
impl PartialEq for Delegation
impl StructuralPartialEq for Delegation
Auto Trait Implementations§
impl Freeze for Delegation
impl RefUnwindSafe for Delegation
impl Send for Delegation
impl Sync for Delegation
impl Unpin for Delegation
impl UnsafeUnpin for Delegation
impl UnwindSafe for Delegation
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