pub struct Bridge<Next, Format>{ /* private fields */ }Expand description
FFI Bridge with support for wrapping a middleware stack
Implementations§
Source§impl<Next, Format> Bridge<Next, Format>
impl<Next, Format> Bridge<Next, Format>
Sourcepub fn new<F>(next: Next, effect_callback: F) -> Self
pub fn new<F>(next: Next, effect_callback: F) -> Self
Typically, you would would use Layer::bridge to construct a Bridge instance
Sourcepub fn update(
&self,
event_bytes: &[u8],
requests_out: &mut Vec<u8>,
) -> Result<(), BridgeError<Format>>
pub fn update( &self, event_bytes: &[u8], requests_out: &mut Vec<u8>, ) -> Result<(), BridgeError<Format>>
Send a serialized event to the core
§Errors
Returns an BridgeError when any of the (de)serialization fails
Auto Trait Implementations§
impl<Next, Format> Freeze for Bridge<Next, Format>where
Next: Freeze,
impl<Next, Format> !RefUnwindSafe for Bridge<Next, Format>
impl<Next, Format> Send for Bridge<Next, Format>where
Format: Send,
impl<Next, Format> Sync for Bridge<Next, Format>where
Format: Sync,
impl<Next, Format> Unpin for Bridge<Next, Format>
impl<Next, Format> UnsafeUnpin for Bridge<Next, Format>where
Next: UnsafeUnpin,
impl<Next, Format> !UnwindSafe for Bridge<Next, Format>
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