pub struct GrpcBridge { /* private fields */ }Implementations§
Source§impl GrpcBridge
impl GrpcBridge
pub fn new(channel: Arc<dyn GrpcChannel>, cfg: GrpcBridgeConfig) -> Self
Sourcepub fn send_frame(
&self,
frame_canonical_json: &[u8],
) -> Result<Vec<u8>, BridgeError>
pub fn send_frame( &self, frame_canonical_json: &[u8], ) -> Result<Vec<u8>, BridgeError>
Send a single frame over the underlying gRPC channel. Returns
the unary reply body so callers can route it through their own
frame-handling path; also fans the body out to listeners
registered via on_frame.
Sourcepub fn send_value(&self, frame: &Value) -> Result<Vec<u8>, BridgeError>
pub fn send_value(&self, frame: &Value) -> Result<Vec<u8>, BridgeError>
Convenience: canonicalise a serde_json::Value frame, send, and return the response body.
pub fn close(&self) -> Result<(), BridgeError>
Trait Implementations§
Source§impl Bridge for GrpcBridge
impl Bridge for GrpcBridge
Source§impl RpcTransport for GrpcBridge
impl RpcTransport for GrpcBridge
Auto Trait Implementations§
impl !Freeze for GrpcBridge
impl !RefUnwindSafe for GrpcBridge
impl !UnwindSafe for GrpcBridge
impl Send for GrpcBridge
impl Sync for GrpcBridge
impl Unpin for GrpcBridge
impl UnsafeUnpin for GrpcBridge
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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 more