pub struct ParentTransport { /* private fields */ }Expand description
A Transport to the service a graft is mounted in, for the methods it
needs and the standard upward interface alone.
Implementations§
Source§impl ParentTransport
impl ParentTransport
Sourcepub fn in_call(child: &str, needs: Arc<[String]>) -> Result<Self, PlexusError>
pub fn in_call(child: &str, needs: Arc<[String]>) -> Result<Self, PlexusError>
The service the call being run was routed in (or forwarded from):
over the mount’s connection back when there is one, else in process.
child names the graft; needs are the method paths it may call
beyond the standard interface.
Sourcepub fn local(
service: Arc<DynamicHub>,
caller: Option<AuthContext>,
child: &str,
needs: Arc<[String]>,
) -> Self
pub fn local( service: Arc<DynamicHub>, caller: Option<AuthContext>, child: &str, needs: Arc<[String]>, ) -> Self
In process: service’s own routing, every call as caller.
Trait Implementations§
Source§impl Clone for ParentTransport
impl Clone for ParentTransport
Source§impl Debug for ParentTransport
impl Debug for ParentTransport
Source§impl Transport for ParentTransport
impl Transport for ParentTransport
fn call(&self, method: MethodRef, params: Value) -> ItemStream<'_>
Source§fn call_raw(
&self,
method: MethodRef,
params: Value,
) -> Pin<Box<dyn Stream<Item = Result<RawItem, TransportError>> + Send + '_>>
fn call_raw( &self, method: MethodRef, params: Value, ) -> Pin<Box<dyn Stream<Item = Result<RawItem, TransportError>> + Send + '_>>
call for a typed client (PERF.115-36): the same items,
each data item’s content still the wire’s JSON, which
decode_raw decodes straight into the method’s
event. The default is call’s items, each content the Value it
carries; a transport that has the wire’s text (WsTransport) hands it
over unread.Source§fn call_with_input<'a>(
&'a self,
method: MethodRef,
params: Value,
input: Pin<Box<dyn Stream<Item = Result<InputItem, TransportError>> + Send + 'a>>,
) -> Pin<Box<dyn Stream<Item = Result<StreamItem, TransportError>> + Send + 'a>>
fn call_with_input<'a>( &'a self, method: MethodRef, params: Value, input: Pin<Box<dyn Stream<Item = Result<InputItem, TransportError>> + Send + 'a>>, ) -> Pin<Box<dyn Stream<Item = Result<StreamItem, TransportError>> + Send + 'a>>
BIDIR-6:
call, for a method with an input half:
input is sent as the call runs, under the callee’s credit, and ended
when it ends. A transport that carries no input half (the default)
says so in the one item it yields: the call does not hang.Source§fn call_raw_with_input<'a>(
&'a self,
method: MethodRef,
params: Value,
input: Pin<Box<dyn Stream<Item = Result<InputItem, TransportError>> + Send + 'a>>,
) -> Pin<Box<dyn Stream<Item = Result<RawItem, TransportError>> + Send + 'a>>
fn call_raw_with_input<'a>( &'a self, method: MethodRef, params: Value, input: Pin<Box<dyn Stream<Item = Result<InputItem, TransportError>> + Send + 'a>>, ) -> Pin<Box<dyn Stream<Item = Result<RawItem, TransportError>> + Send + 'a>>
BIDIR-6:
call_raw, for a method with an input
half: what a typed client’s method with an Input calls. The default
is call_with_input’s items, each content
the Value it carries.Auto Trait Implementations§
impl !RefUnwindSafe for ParentTransport
impl !UnwindSafe for ParentTransport
impl Forget for ParentTransport
impl Freeze for ParentTransport
impl Send for ParentTransport
impl Sync for ParentTransport
impl Unpin for ParentTransport
impl UnsafeUnpin for ParentTransport
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