#[non_exhaustive]pub enum SurfaceEntityType {
Host,
Other(String),
}Expand description
Wire-safe entity type enum.
Known variants are type-safe; unknown values from newer peers become
Other(String) for forward compatibility. Uses custom Serialize
and Deserialize so that Other(String) emits a bare string on
the wire (not {"other":"..."}).
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.
Implementations§
Trait Implementations§
Source§impl Clone for SurfaceEntityType
impl Clone for SurfaceEntityType
Source§fn clone(&self) -> SurfaceEntityType
fn clone(&self) -> SurfaceEntityType
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 Debug for SurfaceEntityType
impl Debug for SurfaceEntityType
Source§impl<'de> Deserialize<'de> for SurfaceEntityType
impl<'de> Deserialize<'de> for SurfaceEntityType
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SurfaceEntityType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SurfaceEntityType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SurfaceEntityType
Source§impl From<String> for SurfaceEntityType
impl From<String> for SurfaceEntityType
Source§fn from(s: String) -> SurfaceEntityType
fn from(s: String) -> SurfaceEntityType
Converts to this type from the input type.
Source§impl Hash for SurfaceEntityType
impl Hash for SurfaceEntityType
Source§impl PartialEq for SurfaceEntityType
impl PartialEq for SurfaceEntityType
Source§impl Serialize for SurfaceEntityType
impl Serialize for SurfaceEntityType
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
impl StructuralPartialEq for SurfaceEntityType
Auto Trait Implementations§
impl Freeze for SurfaceEntityType
impl RefUnwindSafe for SurfaceEntityType
impl Send for SurfaceEntityType
impl Sync for SurfaceEntityType
impl Unpin for SurfaceEntityType
impl UnsafeUnpin for SurfaceEntityType
impl UnwindSafe for SurfaceEntityType
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.