Struct sn_node::Network[][src]

pub struct Network { /* fields omitted */ }

Implementations

impl Network[src]

pub async fn new(config: &NodeConfig) -> Result<(Self, EventStream)>[src]

pub async fn sign_as_node<T: Serialize>(&self, data: &T) -> Result<Signature>[src]

Sign with our node’s ED25519 key

pub async fn sign_as_elder<T: Serialize>(
    &self,
    data: &T
) -> Result<SignatureShare>
[src]

Sign with our BLS PK Share

pub async fn sign_as_elder_raw<T: Serialize>(
    &self,
    data: &T
) -> Result<SignatureShare>
[src]

Sign with our BLS PK Share

pub async fn age(&self) -> u8[src]

pub async fn public_key(&self) -> Ed25519PublicKey[src]

pub async fn section_public_key(&self) -> Result<PublicKey>[src]

pub async fn sibling_public_key(&self) -> Option<PublicKey>[src]

pub async fn matching_section(&self, name: &XorName) -> Option<PublicKey>[src]

pub async fn our_public_key_set(&self) -> Result<PublicKeySet>[src]

pub async fn get_section_pk_by_name(&self, name: &XorName) -> Result<PublicKey>[src]

pub async fn our_name(&self) -> XorName[src]

pub async fn our_connection_info(&mut self) -> SocketAddr[src]

pub async fn our_prefix(&self) -> Prefix[src]

pub async fn section_chain(&self) -> SectionChain[src]

pub async fn matches_our_prefix(&self, name: XorName) -> bool[src]

pub async fn send_message(
    &self,
    itinerary: Itinerary,
    content: Bytes
) -> Result<(), RoutingError>
[src]

pub async fn set_joins_allowed(&mut self, joins_allowed: bool) -> Result<()>[src]

pub async fn is_elder(&self) -> bool[src]

Returns whether the node is Elder.

pub async fn our_public_key_share(&self) -> Result<PublicKey>[src]

get our PKshare

pub async fn our_index(&self) -> Result<usize>[src]

BLS key index in routing for key shares

pub async fn our_elder_names(&self) -> BTreeSet<XorName>[src]

pub async fn our_elder_addresses(&self) -> Vec<(XorName, SocketAddr)>[src]

pub async fn our_elder_addresses_sorted_by_distance_to(
    &self,
    name: &XorName
) -> Vec<(XorName, SocketAddr)>
[src]

pub async fn our_elder_names_sorted_by_distance_to(
    &self,
    name: &XorName,
    count: usize
) -> Vec<XorName>
[src]

pub async fn age_of_node(&self, node: XorName) -> Vec<XorName>[src]

pub async fn our_members(&self) -> BTreeMap<XorName, u8>[src]

pub async fn our_adults(&self) -> Vec<XorName>[src]

pub async fn our_adults_sorted_by_distance_to(
    &self,
    name: &XorName,
    count: usize
) -> Vec<XorName>
[src]

Trait Implementations

impl Clone for Network[src]

Auto Trait Implementations

impl !RefUnwindSafe for Network

impl Send for Network

impl Sync for Network

impl Unpin for Network

impl !UnwindSafe for Network

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,