#[repr(i32)]pub enum ConnectionStatus {
Unknown = 0,
Ready = 1,
Exited = 2,
Failed = 3,
}Expand description
Indicates the status of a connection.
Variants§
Unknown = 0
Connection status is unknown.
Ready = 1
Connection was set up successfully. Server and client may now exchange messages.
Exited = 2
The server’s target program has exited. The server will immediately close the connection, and the client is expected to exit after its cleanup.
Failed = 3
A fatal error was encountered. The connection will be closed.
Implementations§
Source§impl ConnectionStatus
impl ConnectionStatus
Sourcepub const fn is_valid(value: i32) -> bool
pub const fn is_valid(value: i32) -> bool
Returns true if value is a variant of ConnectionStatus.
Sourcepub fn from_i32(value: i32) -> Option<ConnectionStatus>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<ConnectionStatus>
Use the TryFrom<i32> implementation instead
Converts an i32 to a ConnectionStatus, or None if value is not a valid variant.
Source§impl ConnectionStatus
impl ConnectionStatus
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for ConnectionStatus
impl Clone for ConnectionStatus
Source§fn clone(&self) -> ConnectionStatus
fn clone(&self) -> ConnectionStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectionStatus
impl Debug for ConnectionStatus
Source§impl Default for ConnectionStatus
impl Default for ConnectionStatus
Source§fn default() -> ConnectionStatus
fn default() -> ConnectionStatus
Source§impl From<ConnectionStatus> for i32
impl From<ConnectionStatus> for i32
Source§fn from(value: ConnectionStatus) -> i32
fn from(value: ConnectionStatus) -> i32
Source§impl Hash for ConnectionStatus
impl Hash for ConnectionStatus
Source§impl Ord for ConnectionStatus
impl Ord for ConnectionStatus
Source§fn cmp(&self, other: &ConnectionStatus) -> Ordering
fn cmp(&self, other: &ConnectionStatus) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ConnectionStatus
impl PartialEq for ConnectionStatus
Source§fn eq(&self, other: &ConnectionStatus) -> bool
fn eq(&self, other: &ConnectionStatus) -> bool
self and other values to be equal, and is used by ==.