pub enum Transport {
gRPC(GrpcTransport),
IPC(IPCTransportImpl),
WASM(WASMTransportImpl),
}Expand description
Transport enumeration
Union type for all supported transport implementations.
Variants§
gRPC(GrpcTransport)
gRPC-based transport
IPC(IPCTransportImpl)
Inter-process communication transport
WASM(WASMTransportImpl)
Direct WASM module transport
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 as_grpc(&self) -> Option<&GrpcTransport>
pub fn as_grpc(&self) -> Option<&GrpcTransport>
Get gRPC transport reference (if applicable)
Sourcepub fn as_ipc(&self) -> Option<&IPCTransportImpl>
pub fn as_ipc(&self) -> Option<&IPCTransportImpl>
Get IPC transport reference (if applicable)
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 !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