pub enum UpgradeType {
Http,
WebSocket,
Unknown(String),
}Expand description
Represents different upgrade types.
Variants§
Implementations§
Source§impl UpgradeType
impl UpgradeType
Sourcepub fn is_http(&self) -> bool
pub fn is_http(&self) -> bool
Checks if the current value is Http.
-
self- The current instance of the enum. -
Returns
trueifselfisSelf::Http, otherwisefalse.
Sourcepub fn is_websocket(&self) -> bool
pub fn is_websocket(&self) -> bool
Checks if the current value is WebSocket.
-
self- The current instance of the enum. -
Returns
trueifselfisSelf::WebSocket, otherwisefalse.
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Checks if the current value is neither Http nor WebSocket.
-
self- The current instance of the enum. -
Returns
trueifselfis neitherSelf::HttpnorSelf::WebSocket, otherwisefalse.
Trait Implementations§
Source§impl Clone for UpgradeType
impl Clone for UpgradeType
Source§fn clone(&self) -> UpgradeType
fn clone(&self) -> UpgradeType
Returns a copy 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 UpgradeType
impl Debug for UpgradeType
Source§impl Default for UpgradeType
impl Default for UpgradeType
Source§fn default() -> UpgradeType
fn default() -> UpgradeType
Returns the “default value” for a type. Read more
Source§impl Display for UpgradeType
impl Display for UpgradeType
Source§impl FromStr for UpgradeType
impl FromStr for UpgradeType
Source§impl PartialEq for UpgradeType
impl PartialEq for UpgradeType
impl Eq for UpgradeType
impl StructuralPartialEq for UpgradeType
Auto Trait Implementations§
impl Freeze for UpgradeType
impl RefUnwindSafe for UpgradeType
impl Send for UpgradeType
impl Sync for UpgradeType
impl Unpin for UpgradeType
impl UnwindSafe for UpgradeType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.