[][src]Struct sn_node::Network

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]

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

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

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

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

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

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

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

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

pub async fn send_message(
    &mut self,
    src: SrcLocation,
    dst: DstLocation,
    content: Bytes
) -> Result<(), RoutingError>
[src]

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

pub async fn send_message_to_client(
    &self,
    peer_addr: SocketAddr,
    msg: Bytes
) -> Result<()>
[src]

pub async fn secret_key_share(&self) -> Result<SecretKeyShare>[src]

pub async fn our_history(&self) -> SectionProofChain[src]

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

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 our_adults(&self) -> Vec<XorName>[src]

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

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

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

Trait Implementations

impl Clone for Network[src]

Auto Trait Implementations

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>,