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
Sourcepub fn transport_type(&self) -> TransportType
pub fn transport_type(&self) -> TransportType
Get the transport type
Sourcepub 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
Sourcepub 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
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if the transport is connected
Sourcepub fn AsgRPC(&self) -> Option<&gRPCTransport>
pub fn AsgRPC(&self) -> Option<&gRPCTransport>
Get gRPC transport reference (if applicable)
Sourcepub fn AsIPC(&self) -> Option<&IPCTransport>
pub fn AsIPC(&self) -> Option<&IPCTransport>
Returns the IPC transport reference if this is an IPC transport.
Sourcepub 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 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
§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>
Converts
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
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 moreSource§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>
Wrap the input message
T in a tonic::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
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.