pub struct DecideRequest {
pub state: Value,
pub questions: BTreeMap<String, Question>,
pub deadline: Option<Duration>,
}Expand description
One decision call.
Fields§
§state: ValueWhat is being judged: a string, object or array.
questions: BTreeMap<String, Question>§deadline: Option<Duration>Per-call budget; None = the backend’s (or chain’s) default.
Implementations§
Source§impl DecideRequest
impl DecideRequest
pub fn new( state: impl Into<Value>, questions: BTreeMap<String, Question>, ) -> Self
pub fn with_deadline(self, deadline: Option<Duration>) -> Self
Sourcepub fn validate(&self) -> Result<(), DecideError>
pub fn validate(&self) -> Result<(), DecideError>
DEC-E006 unless there is at least one question and every question
is askable, and state is a string, object or array.
Trait Implementations§
Source§impl Clone for DecideRequest
impl Clone for DecideRequest
Source§impl Debug for DecideRequest
impl Debug for DecideRequest
Source§impl PartialEq for DecideRequest
impl PartialEq for DecideRequest
impl StructuralPartialEq for DecideRequest
Auto Trait Implementations§
impl Freeze for DecideRequest
impl RefUnwindSafe for DecideRequest
impl Send for DecideRequest
impl Sync for DecideRequest
impl Unpin for DecideRequest
impl UnsafeUnpin for DecideRequest
impl UnwindSafe for DecideRequest
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