pub struct Wire { /* private fields */ }Implementations§
Source§impl Wire
impl Wire
Sourcepub async fn discover_catalog(
&self,
target_path: &str,
detail: Detail,
scope: Scope,
) -> Result<Pin<Box<dyn Stream<Item = DiscoverEvent> + '_>>, WsError>
pub async fn discover_catalog( &self, target_path: &str, detail: Detail, scope: Scope, ) -> Result<Pin<Box<dyn Stream<Item = DiscoverEvent> + '_>>, WsError>
Open a Discover walk and stream its typed catalog events.
Yields one DiscoverEvent per graph observation — NodeCatalog, Edge,
Warning — and finally the Done marker (carrying the discover_id),
after which the stream ends. An error terminal or a closed session ends the
stream without a Done.
Source§impl Wire
impl Wire
pub fn open(transport: Pipe) -> Wire
pub fn channel( cancellation: CancellationToken, ) -> (Arc<Wire>, Receiver<Directive>, Sender<Option<SessionOutcome>>, Sender<bool>)
pub async fn open_stream( &self, target_path: &str, kind: Kind, payload: Value, ) -> Result<String, WsError>
pub async fn open_stream_with( &self, target_path: &str, kind: Kind, payload: Value, headers: Map<String, Value>, ) -> Result<String, WsError>
pub async fn open_stream_streaming( &self, target_path: &str, kind: Kind, body: BodyStream, ) -> Result<String, WsError>
pub async fn respond_streaming( &self, corr: &str, body: BodyStream, ) -> Result<(), WsError>
pub async fn open_forward( &self, target_path: &str, kind: Kind, payload: Bytes, hops: Option<u8>, ) -> Result<String, WsError>
pub async fn open_forward_with<F, Fut>( &self, target_path: &str, kind: Kind, payload: Bytes, hops: Option<u8>, headers: Map<String, Value>, body: Option<BodyStream>, opened: F, ) -> Result<String, WsError>
pub async fn send(&self, corr: &str, payload: Value) -> Result<(), WsError>
pub async fn send_bytes( &self, corr: &str, payload: Bytes, ) -> Result<(), WsError>
pub async fn respond(&self, corr: &str, payload: Value) -> Result<(), WsError>
pub async fn respond_with( &self, corr: &str, payload: Bytes, headers: Map<String, Value>, ) -> Result<(), WsError>
pub async fn fail( &self, corr: &str, code: ErrorCode, message: &str, ) -> Result<(), WsError>
pub async fn cancel(&self, corr: &str) -> Result<(), WsError>
pub async fn control(&self, kind: Kind, payload: Bytes) -> Result<(), WsError>
pub async fn session_outcome(&self) -> Result<SessionOutcome, WsError>
pub async fn routes_acked(&self) -> Result<(), WsError>
pub fn shutdown(&self)
pub fn is_closed(&self) -> bool
pub fn client_session(&self) -> ClientSession
pub fn observe(&self) -> Receiver<Envelope>
pub async fn closed(&self)
Auto Trait Implementations§
impl Freeze for Wire
impl RefUnwindSafe for Wire
impl Send for Wire
impl Sync for Wire
impl Unpin for Wire
impl UnsafeUnpin for Wire
impl UnwindSafe for Wire
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