pub struct ZapSplitTarget {
pub pubkey: PublicKey,
pub relay: Option<RelayUrl>,
pub weight: Option<u64>,
}Expand description
One target inside a split-zap zap tag (Appendix G).
Weights are generalised percentages: clients SHOULD sum the
weights of every zap tag and divide each receiver’s share
proportionally. If a tag omits the weight, the spec’s
behaviour depends on whether any sibling tag carries one:
- None of them carry weights → split equally.
- Some of them carry weights → those without one MUST be
skipped (
weight = 0).
Fields§
§pubkey: PublicKeyRecipient pubkey.
relay: Option<RelayUrl>Optional relay hint where the recipient’s metadata can be fetched.
weight: Option<u64>Optional split weight.
Implementations§
Trait Implementations§
Source§impl Clone for ZapSplitTarget
impl Clone for ZapSplitTarget
Source§fn clone(&self) -> ZapSplitTarget
fn clone(&self) -> ZapSplitTarget
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 ZapSplitTarget
impl Debug for ZapSplitTarget
impl Eq for ZapSplitTarget
Source§impl PartialEq for ZapSplitTarget
impl PartialEq for ZapSplitTarget
impl StructuralPartialEq for ZapSplitTarget
Auto Trait Implementations§
impl Freeze for ZapSplitTarget
impl RefUnwindSafe for ZapSplitTarget
impl Send for ZapSplitTarget
impl Sync for ZapSplitTarget
impl Unpin for ZapSplitTarget
impl UnsafeUnpin for ZapSplitTarget
impl UnwindSafe for ZapSplitTarget
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.