pub struct Node { /* private fields */ }
Expand description
Reliable UDP transport layer
Implementations§
Source§impl Node
impl Node
Sourcepub fn new(
adnl: Arc<Node>,
subscribers: Vec<Arc<dyn QuerySubscriber>>,
options: NodeOptions,
) -> Result<Arc<Self>>
pub fn new( adnl: Arc<Node>, subscribers: Vec<Arc<dyn QuerySubscriber>>, options: NodeOptions, ) -> Result<Arc<Self>>
Create new RLDP node on top of the given ADNL node
pub fn options(&self) -> &NodeOptions
pub fn metrics(&self) -> NodeMetrics
pub async fn query( &self, local_id: &NodeIdShort, peer_id: &NodeIdShort, data: Vec<u8>, roundtrip: Option<u64>, ) -> Result<(Option<Vec<u8>>, u64)>
Auto Trait Implementations§
impl Freeze for Node
impl !RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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