pub struct Node {
pub store: Arc<Store>,
pub identity: PrivateIdentity,
pub cfg: Config,
pub metrics: Metrics,
pub bus: Bus,
}Fields§
§store: Arc<Store>§identity: PrivateIdentity§cfg: Config§metrics: Metrics§bus: BusImplementations§
Source§impl Node
impl Node
pub fn open(dir: &Path, cfg: Config) -> Result<Self>
pub fn send_file( &self, path: &Path, to: &str, public: bool, ttl: Option<u64>, priority: Priority, ) -> Result<ObjectId>
pub fn send_opts(&self, opts: SendOpts) -> Result<ObjectId>
pub fn send_payload( &self, to: &str, plaintext: Vec<u8>, public: bool, ttl: Option<u64>, priority: Priority, application: &str, topic: Option<String>, trusted_only: bool, ) -> Result<ObjectId>
pub fn inbox(&self) -> Result<Vec<InboxItem>>
pub fn explain_route(&self, object: &str, peer: &str) -> Result<String>
pub fn ack_delivery(&self, object: &str) -> Result<Receipt>
Sourcepub async fn sync_once(&self, addr: SocketAddr) -> Result<SyncStats>
pub async fn sync_once(&self, addr: SocketAddr) -> Result<SyncStats>
One-shot TCP session with a peer, then disconnect. Used by dd sync / dd connect.
pub async fn serve( &self, listen: SocketAddr, static_peers: Vec<SocketAddr>, ) -> Result<()>
pub fn predict_route(&self, dest: &str) -> Result<DeliveryForecast>
pub fn events(&self) -> Vec<Event>
pub fn set_mode(&mut self, mode: NodeMode)
Auto Trait Implementations§
impl !Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin 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