pub struct RemoveRequest {
pub node: DidNostr,
pub operation_id: OperationId,
pub require_archive: bool,
}Expand description
The body of POST /api/v1/members/{pk}/remove.
require_archive defaults to true when the member is absent. Setting
it to false is the administrator’s recorded decision to remove
without an archive; it is part of the signed body, and the node audits
who waived it. The client always writes the member, so the signed bytes
say which was chosen.
§Examples
use stratum_node_core::RemoveRequest;
let node = "did:nostr:79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798";
let defaulted: RemoveRequest =
serde_json::from_str(&format!(r#"{{"node":"{node}","operation_id":"rm-1"}}"#))?;
assert!(defaulted.require_archive);
let waived: RemoveRequest = serde_json::from_str(&format!(
r#"{{"node":"{node}","operation_id":"rm-1","require_archive":false}}"#
))?;
assert!(!waived.require_archive);
assert!(serde_json::to_string(&waived)?.ends_with(r#""require_archive":false}"#));Fields§
§node: DidNostrThe node the request is addressed to.
operation_id: OperationIdThe administrator’s operation ID.
require_archive: boolWhether an archive taken in the current suspension is required.
Trait Implementations§
Source§impl Clone for RemoveRequest
impl Clone for RemoveRequest
Source§impl Debug for RemoveRequest
impl Debug for RemoveRequest
Source§impl<'de> Deserialize<'de> for RemoveRequest
impl<'de> Deserialize<'de> for RemoveRequest
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 RemoveRequest
Source§impl Hash for RemoveRequest
impl Hash for RemoveRequest
Source§impl PartialEq for RemoveRequest
impl PartialEq for RemoveRequest
Source§impl Serialize for RemoveRequest
impl Serialize for RemoveRequest
impl StructuralPartialEq for RemoveRequest
Auto Trait Implementations§
impl Forget for RemoveRequest
impl Freeze for RemoveRequest
impl Move for RemoveRequest
impl RefUnwindSafe for RemoveRequest
impl Send for RemoveRequestwhere
RawVecInner: Send,
impl Sync for RemoveRequestwhere
RawVecInner: Sync,
impl Unpin for RemoveRequest
impl UnsafeUnpin for RemoveRequest
impl UnwindSafe for RemoveRequestwhere
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