Struct everscale_network::OverlayNode
source · [−]pub struct OverlayNode { /* private fields */ }Expand description
P2P messages distribution layer group
Implementations
sourceimpl OverlayNode
impl OverlayNode
pub fn new(
adnl: Arc<AdnlNode>,
zero_state_file_hash: [u8; 32],
key_tag: usize
) -> Result<Arc<Self>>
pub fn query_subscriber(&self) -> Arc<dyn QuerySubscriber>
pub fn metrics(
&self
) -> impl Iterator<Item = (OverlayIdShort, OverlayShardMetrics)> + '_
sourcepub fn add_overlay_subscriber(
&self,
overlay_id: OverlayIdShort,
subscriber: Arc<dyn QuerySubscriber>
) -> bool
pub fn add_overlay_subscriber(
&self,
overlay_id: OverlayIdShort,
subscriber: Arc<dyn QuerySubscriber>
) -> bool
Add overlay queries subscriber
sourcepub fn add_public_overlay(
&self,
overlay_id: &OverlayIdShort,
options: OverlayShardOptions
) -> (Arc<OverlayShard>, bool)
pub fn add_public_overlay(
&self,
overlay_id: &OverlayIdShort,
options: OverlayShardOptions
) -> (Arc<OverlayShard>, bool)
Creates new overlay shard
sourcepub fn get_overlay(
&self,
overlay_id: &OverlayIdShort
) -> Result<Arc<OverlayShard>>
pub fn get_overlay(
&self,
overlay_id: &OverlayIdShort
) -> Result<Arc<OverlayShard>>
Returns overlay by specified id
sourcepub fn compute_overlay_id(&self, workchain: i32) -> OverlayIdFull
pub fn compute_overlay_id(&self, workchain: i32) -> OverlayIdFull
Computes full overlay id using zero state file hash
sourcepub fn compute_overlay_short_id(&self, workchain: i32) -> OverlayIdShort
pub fn compute_overlay_short_id(&self, workchain: i32) -> OverlayIdShort
Computes short overlay id using zero state file hash
Auto Trait Implementations
impl !RefUnwindSafe for OverlayNode
impl Send for OverlayNode
impl Sync for OverlayNode
impl Unpin for OverlayNode
impl !UnwindSafe for OverlayNode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more