pub struct ConsentRequest {
pub operation_id: OperationId,
pub grant_sha256: Sha256Digest,
pub read_back: bool,
}Expand description
The body of POST /api/v1/installations/{id}/consent.
read_back must be true: the client states that it read every
container’s ACL back and found the offered authorisation.
§Examples
use stratum_node_core::{ConsentRequest, Sha256Digest};
let body = ConsentRequest { operation_id: "c-1".parse()?, grant_sha256: Sha256Digest::of(b"t"), read_back: true };
let text = serde_json::to_string(&body)?;
assert!(text.starts_with(r#"{"operation_id":"c-1","grant_sha256":""#));
assert!(text.ends_with(r#","read_back":true}"#));Fields§
§operation_id: OperationIdThe member’s operation ID.
grant_sha256: Sha256DigestThe offered grant’s combined hash.
read_back: boolAlways true.
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
impl Eq for ConsentRequest
Source§impl Hash for ConsentRequest
impl Hash for ConsentRequest
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 ConsentRequestwhere
RawVecInner: Send,
impl Sync for ConsentRequestwhere
RawVecInner: Sync,
impl Unpin for ConsentRequest
impl UnsafeUnpin for ConsentRequest
impl UnwindSafe for ConsentRequestwhere
RawVecInner: 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