pub struct Announcement {
pub node: NodeId,
pub signature: Signature,
pub message: AnnouncementMessage,
}
Fields§
§node: NodeId
Node identifier.
signature: Signature
Signature over the announcement.
message: AnnouncementMessage
Unsigned node announcement.
Implementations§
Source§impl Announcement
impl Announcement
Sourcepub const POW_PARAMS: (u8, u32, u32)
pub const POW_PARAMS: (u8, u32, u32)
Proof-of-work parameters for announcements.
These parameters are fed into scrypt
.
They represent the log2(N)
, r
, p
parameters, respectively.
- log2(N) – iterations count (affects memory and CPU usage), e.g. 15
- r – block size (affects memory and CPU usage), e.g. 8
- p – parallelism factor (threads to run in parallel - affects the memory, CPU usage), usually 1
15, 8, 1
are usually the recommended parameters.
pub fn matches(&self, filter: &Filter) -> bool
Sourcepub fn variant_eq(&self, other: &Self) -> bool
pub fn variant_eq(&self, other: &Self) -> bool
Check whether this announcement is of the same variant as another.
Trait Implementations§
Source§impl Clone for Announcement
impl Clone for Announcement
Source§fn clone(&self) -> Announcement
fn clone(&self) -> Announcement
Returns a duplicate of the value. Read more
1.0.0 · 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 Announcement
impl Debug for Announcement
Source§impl From<Announcement> for Message
impl From<Announcement> for Message
Source§fn from(ann: Announcement) -> Self
fn from(ann: Announcement) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Announcement
impl PartialEq for Announcement
impl Eq for Announcement
impl StructuralPartialEq for Announcement
Auto Trait Implementations§
impl Freeze for Announcement
impl RefUnwindSafe for Announcement
impl Send for Announcement
impl Sync for Announcement
impl Unpin for Announcement
impl UnwindSafe for Announcement
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
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more