#[non_exhaustive]pub struct ConsentRequest {
pub plan_digest: Digest,
pub base_revision: u64,
pub input_vector: InputVector,
pub plan: Plan,
/* private fields */
}Expand description
Canonical plan view and exact approval binding, not a caller-composed summary.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.plan_digest: Digest§base_revision: u64§input_vector: InputVector§plan: PlanImplementations§
Source§impl ConsentRequest
impl ConsentRequest
Sourcepub fn new(plan: Plan) -> Result<Self, CanonicalError>
pub fn new(plan: Plan) -> Result<Self, CanonicalError>
Builds the request from the plan alone, so its digest, revision and input vector always describe the plan the card shows.
Sourcepub fn is_consistent(&self) -> bool
pub fn is_consistent(&self) -> bool
Whether the binding fields describe the carried plan. A responder shows and answers only a consistent request, so a card can never display one plan while its approval binds another.
Trait Implementations§
Source§impl Clone for ConsentRequest
impl Clone for ConsentRequest
Source§impl Debug for ConsentRequest
impl Debug for ConsentRequest
Source§impl<'de> Deserialize<'de> for ConsentRequest
impl<'de> Deserialize<'de> for ConsentRequest
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
Source§impl PartialEq for ConsentRequest
impl PartialEq for ConsentRequest
Source§impl Serialize for ConsentRequest
impl Serialize for ConsentRequest
impl StructuralPartialEq for ConsentRequest
Auto Trait Implementations§
impl Forget for ConsentRequest
impl Freeze for ConsentRequest
impl Move for ConsentRequest
impl RefUnwindSafe for ConsentRequest
impl Send for ConsentRequest
impl Sync for ConsentRequest
impl Unpin for ConsentRequest
impl UnsafeUnpin for ConsentRequest
impl UnwindSafe for ConsentRequest
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