#[non_exhaustive]pub enum ApprovalTarget {
Event {
id: EventId,
relay_hint: Option<RelayUrl>,
},
Address {
coordinate: Coordinate,
relay_hint: Option<RelayUrl>,
},
Both {
id: EventId,
coordinate: Coordinate,
relay_hint: Option<RelayUrl>,
},
}Expand description
Pointer to the post being approved.
Spec §“Moderation” allows three forms:
e-tag only (regular events, or one specific replaceable version);a-tag only (replaceable events at any version);- both, so clients can show “the version at the time of approval”.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Event
Approval points at a specific event id.
Address
Approval points at a replaceable event coordinate.
Fields
§
coordinate: CoordinateCoordinate of the post.
Both
Approval pins a specific version (e) of an addressable
post (a).
Trait Implementations§
Source§impl Clone for ApprovalTarget
impl Clone for ApprovalTarget
Source§fn clone(&self) -> ApprovalTarget
fn clone(&self) -> ApprovalTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApprovalTarget
impl Debug for ApprovalTarget
impl Eq for ApprovalTarget
Source§impl PartialEq for ApprovalTarget
impl PartialEq for ApprovalTarget
impl StructuralPartialEq for ApprovalTarget
Auto Trait Implementations§
impl Freeze for ApprovalTarget
impl RefUnwindSafe for ApprovalTarget
impl Send for ApprovalTarget
impl Sync for ApprovalTarget
impl Unpin for ApprovalTarget
impl UnsafeUnpin for ApprovalTarget
impl UnwindSafe for ApprovalTarget
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.