pub enum CollectionTransportRoute {
Fixed {
transport_type: TransportType,
},
Bypass {
encoding: MessageEncoding,
ttl_ms: u64,
bypass_transport: BypassTransport,
},
Pace {
policy_override: Option<TransportPolicy>,
},
}Expand description
Routing strategy for a specific collection
Determines how messages for a collection are routed to a transport.
This generalizes the BypassCollectionConfig pattern to all transports.
§Variants
Fixed— Always use a specific transport type (e.g., Quic, BluetoothLE)Bypass— Route via UDP bypass channelPace— Use PACE-based dynamic selection with optional policy override
§Example
use peat_mesh::transport::{CollectionTransportRoute, TransportType};
// Fixed route to BLE
let ble_route = CollectionTransportRoute::Fixed {
transport_type: TransportType::BluetoothLE,
};
// PACE route with default policy
let pace_route = CollectionTransportRoute::Pace {
policy_override: None,
};Variants§
Fixed
Always use a specific transport type (e.g., Quic, BluetoothLE)
Fields
§
transport_type: TransportTypeBypass
Route via UDP bypass channel
Pace
Use PACE-based dynamic selection
Fields
§
policy_override: Option<TransportPolicy>Trait Implementations§
Source§impl Clone for CollectionTransportRoute
impl Clone for CollectionTransportRoute
Source§fn clone(&self) -> CollectionTransportRoute
fn clone(&self) -> CollectionTransportRoute
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CollectionTransportRoute
impl Debug for CollectionTransportRoute
Source§impl<'de> Deserialize<'de> for CollectionTransportRoute
impl<'de> Deserialize<'de> for CollectionTransportRoute
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CollectionTransportRoute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CollectionTransportRoute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CollectionTransportRoute
impl Serialize for CollectionTransportRoute
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CollectionTransportRoute
impl RefUnwindSafe for CollectionTransportRoute
impl Send for CollectionTransportRoute
impl Sync for CollectionTransportRoute
impl Unpin for CollectionTransportRoute
impl UnsafeUnpin for CollectionTransportRoute
impl UnwindSafe for CollectionTransportRoute
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 more