pub struct BridgeOptions {
pub mode: BridgeMode,
pub route_label: Option<String>,
pub request_hook: Option<Arc<dyn RequestBridgeHook>>,
pub response_hook: Option<Arc<dyn ResponseBridgeHook>>,
pub stream_hook: Option<Arc<dyn StreamBridgeHook>>,
pub primitive_remapper: Option<Arc<dyn BridgePrimitiveRemapper>>,
pub loss_policy: Arc<dyn BridgeLossPolicy>,
}Expand description
Shared bridge configuration surface.
Fields§
§mode: BridgeMode§route_label: Option<String>§request_hook: Option<Arc<dyn RequestBridgeHook>>§response_hook: Option<Arc<dyn ResponseBridgeHook>>§stream_hook: Option<Arc<dyn StreamBridgeHook>>§primitive_remapper: Option<Arc<dyn BridgePrimitiveRemapper>>§loss_policy: Arc<dyn BridgeLossPolicy>Implementations§
Source§impl BridgeOptions
impl BridgeOptions
pub fn new(mode: BridgeMode) -> Self
pub fn with_route_label(self, route_label: impl Into<String>) -> Self
pub fn with_request_hook(self, hook: Arc<dyn RequestBridgeHook>) -> Self
pub fn with_response_hook(self, hook: Arc<dyn ResponseBridgeHook>) -> Self
pub fn with_stream_hook(self, hook: Arc<dyn StreamBridgeHook>) -> Self
pub fn with_primitive_remapper( self, remapper: Arc<dyn BridgePrimitiveRemapper>, ) -> Self
pub fn with_loss_policy(self, policy: Arc<dyn BridgeLossPolicy>) -> Self
pub fn with_customization( self, customization: Arc<dyn BridgeCustomization>, ) -> Self
pub fn merged_with(self, overlay: BridgeOptions) -> Self
pub fn merged_with_override(self, overlay: BridgeOptionsOverride) -> Self
Trait Implementations§
Source§impl Clone for BridgeOptions
impl Clone for BridgeOptions
Source§fn clone(&self) -> BridgeOptions
fn clone(&self) -> BridgeOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for BridgeOptions
impl Default for BridgeOptions
Source§impl From<BridgeOptions> for BridgeOptionsOverride
impl From<BridgeOptions> for BridgeOptionsOverride
Source§fn from(value: BridgeOptions) -> Self
fn from(value: BridgeOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BridgeOptions
impl !RefUnwindSafe for BridgeOptions
impl Send for BridgeOptions
impl Sync for BridgeOptions
impl Unpin for BridgeOptions
impl UnsafeUnpin for BridgeOptions
impl !UnwindSafe for BridgeOptions
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