pub struct Node { /* private fields */ }Implementations§
Source§impl Node
impl Node
pub async fn fetch_body( self: &Arc<Self>, request: Request<WireBody>, ) -> Result<Response<WireBody>, HandlerError>
pub async fn fetch_body_with_timeout( self: &Arc<Self>, request: Request<WireBody>, timeout: Duration, ) -> Result<Response<WireBody>, HandlerError>
pub async fn fetch( self: &Arc<Self>, request: Request<Bytes>, ) -> Result<Response<ServiceBody>, HandlerError>
pub async fn subscribe( self: &Arc<Self>, target_path: &str, payload: Value, ) -> Result<EventStream, HandlerError>
pub async fn subscribe_with( self: &Arc<Self>, target_path: &str, payload: Value, headers: Map<String, Value>, ) -> Result<EventStream, HandlerError>
pub async fn subscribe_bytes( self: &Arc<Self>, target_path: &str, payload: Bytes, headers: Map<String, Value>, ) -> Result<EventStream, HandlerError>
Source§impl Node
impl Node
Sourcepub async fn connect(
self: &Arc<Self>,
endpoints: impl Into<EndpointSet>,
) -> Result<PeerConnection, ConnectError>
pub async fn connect( self: &Arc<Self>, endpoints: impl Into<EndpointSet>, ) -> Result<PeerConnection, ConnectError>
Eagerly dial, verify the peer, and synchronize its routes.
The returned logical connection is retained by the node and automatically maintains an unintentionally lost selected session.
pub async fn link(self: &Arc<Self>, other: &Arc<Node>) -> Result<(), WsError>
Source§impl Node
impl Node
Sourcepub async fn discover_target_events(
self: &Arc<Self>,
target: &str,
detail: Detail,
scope: Scope,
) -> Result<Vec<DiscoverEvent>, HandlerError>
pub async fn discover_target_events( self: &Arc<Self>, target: &str, detail: Detail, scope: Scope, ) -> Result<Vec<DiscoverEvent>, HandlerError>
Discover relative to one explicitly named final node.
pub async fn discover_events( self: &Arc<Self>, detail: Detail, scope: Scope, ) -> Vec<DiscoverEvent>
Source§impl Node
impl Node
pub fn cancellation(&self) -> &CancellationToken
pub fn identity(&self) -> &NodeIdentity
pub fn shutdown(&self)
pub fn reachable_names(&self) -> Vec<String>
pub fn catalog_revision(&self) -> u64
pub fn local_catalog(&self, detail_full: bool) -> Value
pub async fn remove_subject(&self, subject: &str) -> Result<(), WsError>
pub async fn add_service(&self, handler: impl Handler) -> Result<(), WsError>
pub async fn remove_operation( &self, subject: &str, operation: Operation, ) -> Result<(), WsError>
Source§impl Node
impl Node
pub fn serve_ws_upgrade(self: &Arc<Self>, upgrade: WebSocketUpgrade) -> Response
pub async fn serve_webtransport( self: &Arc<Self>, connection: Connection, ) -> Result<Arc<Wire>, WsError>
pub async fn serve_transport(self: &Arc<Self>, transport: Pipe) -> Arc<Wire> ⓘ
pub async fn connect_transport( self: &Arc<Self>, peer: &str, transport: Pipe, ) -> Result<Arc<Wire>, WsError>
Source§impl Node
impl Node
pub async fn start_topology( self: &Arc<Self>, config: TopologyConfig, ) -> Result<UnbTopology, WsError>
Source§impl Node
impl Node
pub fn host_unix_child( self: &Arc<Self>, path: impl AsRef<Path>, expected_child: impl Into<String>, ) -> Result<UnixHosting, WsError>
pub fn host_unix(self: &Arc<Self>, listener: UnixListener) -> UnixHosting
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Node
impl !RefUnwindSafe for Node
impl !UnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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