#[non_exhaustive]pub enum TransportPreference {
WsFirst,
SseFirst,
WsOnly,
SseOnly,
}Expand description
Transport preference for the client connection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WsFirst
Try WebSocket first, fall back to SSE if unavailable.
SseFirst
Try SSE first, fall back to WebSocket if unavailable.
WsOnly
WebSocket only — fail if upgrade is rejected.
SseOnly
SSE only — client→server via POST /ack endpoint.
Trait Implementations§
Source§impl Clone for TransportPreference
impl Clone for TransportPreference
Source§fn clone(&self) -> TransportPreference
fn clone(&self) -> TransportPreference
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 TransportPreference
impl Debug for TransportPreference
Source§impl PartialEq for TransportPreference
impl PartialEq for TransportPreference
impl Copy for TransportPreference
impl Eq for TransportPreference
impl StructuralPartialEq for TransportPreference
Auto Trait Implementations§
impl Freeze for TransportPreference
impl RefUnwindSafe for TransportPreference
impl Send for TransportPreference
impl Sync for TransportPreference
impl Unpin for TransportPreference
impl UnsafeUnpin for TransportPreference
impl UnwindSafe for TransportPreference
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