pub enum Transport {
gRPC(gRPCTransport),
IPC(IPCTransport),
WASM(WASMTransportImpl),
}
Expand description
Transport enumeration.
Union type wrapping all supported transport implementations.
Variants§
gRPC(gRPCTransport)
gRPC-based transport (Mountain/Air communication).
IPC(IPCTransport)
IPC transport (same-machine process communication).
WASM(WASMTransportImpl)
Direct WASM module transport (browser).
Implementations§
Source§
impl
Transport
impl Transport
Source
pub fn
transport_type(&self) ->
TransportType
pub fn transport_type(&self) -> TransportType
Get the transport type
Source
pub async fn
send(&self, request: &[u8]) ->
Result<Vec<u8>>
pub async fn send(&self, request: &[u8]) -> Result<Vec<u8>>
Send a request and receive a response
Source
pub async fn
send_no_response(&self, data: &[u8]) ->
Result<()>
pub async fn send_no_response(&self, data: &[u8]) -> Result<()>
Send data without expecting a response
Source
pub fn
is_connected(&self) ->
bool
pub fn is_connected(&self) -> bool
Check if the transport is connected
Source
pub fn
AsgRPC(&self) ->
Option<&gRPCTransport>
pub fn AsgRPC(&self) -> Option<&gRPCTransport>
Get gRPC transport reference (if applicable)
Source
pub fn
AsIPC(&self) ->
Option<&IPCTransport>
pub fn AsIPC(&self) -> Option<&IPCTransport>
Returns the IPC transport reference if this is an IPC transport.
Source
pub fn
as_wasm(&self) ->
Option<&WASMTransportImpl>
pub fn as_wasm(&self) -> Option<&WASMTransportImpl>
Get WASM transport reference (if applicable)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transport
impl !RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl UnsafeUnpin for Transport
impl !UnwindSafe for Transport
Blanket Implementations§
Source§
impl<T>
BorrowMut<T> for T
where T: ?Sized,
impl<T>
BorrowMut<T> for T
where T: ?Sized,
Source§
fn
borrow_mut(&mut self) ->
&mut T
fn borrow_mut(&mut self) -> &mut T
§
impl<T> Instrument for T
impl<T> Instrument for T
§
fn
instrument(self, span: Span) ->
Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§
fn
in_current_span(self) ->
Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§
impl<T>
IntoEither
for T
impl<T> IntoEither for T
Source§
fn
into_either(self, into_left:
bool) ->
Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a
Left
variant of
Either<Self, Self>
if into_left is
true. Converts
self into a
Right
variant of
Either<Self, Self>
otherwise.
Read more
Source§
fn
into_either_with<F>(self, into_left: F)
->
Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a
Left
variant of
Either<Self, Self>
if
into_left(&self)
returns true. Converts
self into a
Right
variant of
Either<Self, Self>
otherwise.
Read more
Source§
impl<T>
IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§
fn
into_request(self) ->
Request<T>
fn into_request(self) -> Request<T>
T in
a tonic::Request
§
impl<T> Pointable for T
impl<T> Pointable for T
§
impl<T> PolicyExt for T
where T: ?Sized,
impl<T> PolicyExt for T
where T: ?Sized,
§
impl<T> ToStringFallible for T
where T:
Display,
impl<T> ToStringFallible for T
where T:
Display,
§
fn
try_to_string(&self) ->
Result<String,
TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.