pub struct MiniNode<S: MiniNodeStore> { /* private fields */ }Implementations§
Source§impl<S: MiniNodeStore> MiniNode<S>
impl<S: MiniNodeStore> MiniNode<S>
pub fn load_or_create<R: CryptoRngCore + Copy>( rng: R, config: MiniNodeConfig, store: S, ) -> Result<Self, MiniNodeError>
pub fn new_with_identity( identity: PrivateIdentity, config: MiniNodeConfig, store: S, snapshot: NodeSnapshot, ) -> Self
pub fn tick<R: CryptoRngCore + Copy, L: FrameLink>( &mut self, now_ms: u64, rng: R, link: &mut L, ) -> Result<(), MiniNodeError>
pub fn destination_hash(&self) -> [u8; 16]
pub fn identity(&self) -> &PrivateIdentity
pub fn neighbors(&self) -> impl Iterator<Item = &NeighborRecord>
pub fn poll_event(&mut self) -> Option<NodeEvent>
pub fn queue_announce<R: CryptoRngCore + Copy>( &mut self, now_ms: u64, rng: R, app_data: Option<&[u8]>, ) -> Result<(), MiniNodeError>
pub fn send_message( &mut self, destination_hash: [u8; 16], content: &[u8], ) -> Result<MessageEnvelope, MiniNodeError>
pub fn send_message_with_latest_telemetry( &mut self, destination_hash: [u8; 16], content: &[u8], limit: usize, ) -> Result<MessageEnvelope, MiniNodeError>
pub fn record_telemetry( &mut self, sample: TelemetrySample, ) -> Result<(), MiniNodeError>
pub fn query_telemetry(&self, query: &TelemetryQuery) -> Vec<TelemetryPoint>
Auto Trait Implementations§
impl<S> Freeze for MiniNode<S>where
S: Freeze,
impl<S> RefUnwindSafe for MiniNode<S>where
S: RefUnwindSafe,
impl<S> Send for MiniNode<S>where
S: Send,
impl<S> Sync for MiniNode<S>where
S: Sync,
impl<S> Unpin for MiniNode<S>where
S: Unpin,
impl<S> UnsafeUnpin for MiniNode<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for MiniNode<S>where
S: UnwindSafe,
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