Struct sn_node::Network [−][src]
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]
&self,
data: &T
) -> Result<SignatureShare>
Sign with our BLS PK Share
pub async fn sign_as_elder_raw<T: Serialize>(
&self,
data: &T
) -> Result<SignatureShare>
[src]
&self,
data: &T
) -> Result<SignatureShare>
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]
&self,
itinerary: Itinerary,
content: Bytes
) -> Result<(), RoutingError>
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]
&self,
name: &XorName
) -> Vec<(XorName, SocketAddr)>
pub async fn our_elder_names_sorted_by_distance_to(
&self,
name: &XorName,
count: usize
) -> Vec<XorName>
[src]
&self,
name: &XorName,
count: usize
) -> Vec<XorName>
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]
&self,
name: &XorName,
count: usize
) -> Vec<XorName>
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,