Skip to main content

Node

Struct Node 

Source
pub struct Node { /* private fields */ }

Implementations§

Source§

impl Node

Source

pub fn builder(node: &str) -> NodeBuilder

Source§

impl Node

Source

pub async fn fetch_body( self: &Arc<Self>, request: Request<WireBody>, ) -> Result<Response<WireBody>, HandlerError>

Source

pub async fn fetch_body_with_timeout( self: &Arc<Self>, request: Request<WireBody>, timeout: Duration, ) -> Result<Response<WireBody>, HandlerError>

Source

pub async fn fetch( self: &Arc<Self>, request: Request<Bytes>, ) -> Result<Response<ServiceBody>, HandlerError>

Source

pub async fn subscribe( self: &Arc<Self>, target_path: &str, payload: Value, ) -> Result<EventStream, HandlerError>

Source

pub async fn subscribe_with( self: &Arc<Self>, target_path: &str, payload: Value, headers: Map<String, Value>, ) -> Result<EventStream, HandlerError>

Source

pub async fn subscribe_bytes( self: &Arc<Self>, target_path: &str, payload: Bytes, headers: Map<String, Value>, ) -> Result<EventStream, HandlerError>

Source§

impl Node

Source

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.

Source

pub async fn connect_transport_unchecked( self: &Arc<Self>, transport: Pipe, ) -> Result<(), WsError>

Attach one caller-provided outbound transport without imposing an expected peer name. Browser bindings use this after JavaScript completes the platform dial.

Source§

impl Node

Source

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.

Source

pub async fn discover_events( self: &Arc<Self>, detail: Detail, scope: Scope, ) -> Vec<DiscoverEvent>

Source§

impl Node

Source

pub fn cancellation(&self) -> &CancellationToken

Source

pub fn identity(&self) -> &NodeIdentity

Source

pub fn shutdown(&self)

Source

pub fn reachable_names(&self) -> Vec<String>

Source

pub fn catalog_revision(&self) -> u64

Source

pub fn local_catalog(&self, detail_full: bool) -> Value

Source

pub async fn remove_subject(&self, subject: &str) -> Result<(), WsError>

Source

pub async fn add_service(&self, handler: impl Handler) -> Result<(), WsError>

Source

pub async fn remove_operation( &self, subject: &str, operation: Operation, ) -> Result<(), WsError>

Source§

impl Node

Source

pub fn serve_ws_upgrade(self: &Arc<Self>, upgrade: WebSocketUpgrade) -> Response

Source

pub async fn serve_webtransport( self: &Arc<Self>, connection: Connection, ) -> Result<Arc<Wire>, WsError>

Source

pub async fn serve_transport(self: &Arc<Self>, transport: Pipe) -> Arc<Wire>

Source

pub async fn connect_transport( self: &Arc<Self>, peer: &str, transport: Pipe, ) -> Result<Arc<Wire>, WsError>

Source§

impl Node

Source

pub async fn start_topology( self: &Arc<Self>, config: TopologyConfig, ) -> Result<UnbTopology, WsError>

Source§

impl Node

Source

pub fn host_unix_child( self: &Arc<Self>, path: impl AsRef<Path>, expected_child: impl Into<String>, ) -> Result<UnixHosting, WsError>

Source

pub fn host_unix(self: &Arc<Self>, listener: UnixListener) -> UnixHosting

Trait Implementations§

Source§

impl Drop for Node

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

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<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more