pub struct DelegationContract {
pub contract_id: String,
pub objective: String,
pub success_criteria: Vec<String>,
pub policy: PolicyEnvelope,
pub deadline: Option<String>,
pub created_at: String,
}Expand description
A delegation contract — bounded expectations for a task.
Fields§
§contract_id: String§objective: String§success_criteria: Vec<String>§policy: PolicyEnvelope§deadline: Option<String>§created_at: StringImplementations§
Source§impl DelegationContract
impl DelegationContract
pub fn new(objective: impl Into<String>, success_criteria: Vec<String>) -> Self
pub fn with_deadline(self, deadline: impl Into<String>) -> Self
pub fn with_budget(self, budget: BudgetPolicy) -> Self
pub fn with_failure_policy(self, policy: FailurePolicy) -> Self
Trait Implementations§
Source§impl Clone for DelegationContract
impl Clone for DelegationContract
Source§fn clone(&self) -> DelegationContract
fn clone(&self) -> DelegationContract
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 moreSource§impl Debug for DelegationContract
impl Debug for DelegationContract
Source§impl<'de> Deserialize<'de> for DelegationContract
impl<'de> Deserialize<'de> for DelegationContract
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DelegationContract
impl RefUnwindSafe for DelegationContract
impl Send for DelegationContract
impl Sync for DelegationContract
impl Unpin for DelegationContract
impl UnsafeUnpin for DelegationContract
impl UnwindSafe for DelegationContract
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