pub struct Connection {
pub id: String,
pub name: String,
pub created: String,
pub updated: String,
pub players: Vec<Player>,
}Expand description
A client connection.
Fields§
§id: StringThe connection ID.
name: StringThe connection name.
created: StringCreation timestamp.
updated: StringLast update timestamp.
players: Vec<Player>Players available in this connection.
Trait Implementations§
Source§impl AsId for Connection
Converts a Connection ID to a database value.
impl AsId for Connection
Converts a Connection ID to a database value.
Source§fn as_id(&self) -> DatabaseValue
fn as_id(&self) -> DatabaseValue
Returns the connection ID as a database value.
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
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 Connection
impl Debug for Connection
Source§impl Default for Connection
impl Default for Connection
Source§fn default() -> Connection
fn default() -> Connection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Connection
impl<'de> Deserialize<'de> for Connection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Connection> for ApiConnection
Converts a Connection to an ApiConnection.
impl From<Connection> for ApiConnection
Converts a Connection to an ApiConnection.
Source§fn from(value: Connection) -> Self
fn from(value: Connection) -> Self
Converts a Connection into its API representation.
Source§impl PartialEq for Connection
impl PartialEq for Connection
Source§fn eq(&self, other: &Connection) -> bool
fn eq(&self, other: &Connection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Connection
impl Serialize for Connection
Source§impl ToValueType<Connection> for &Row
Converts a database row into a Connection.
impl ToValueType<Connection> for &Row
Converts a database row into a Connection.
Source§fn to_value_type(self) -> Result<Connection, ParseError>
fn to_value_type(self) -> Result<Connection, ParseError>
Converts this database row into a Connection.
§Errors
Returns ParseError if:
- Required database columns are missing
- Database column values have invalid or incompatible types
Source§fn missing_value(&self, error: ParseError) -> Result<T, ParseError>
fn missing_value(&self, error: ParseError) -> Result<T, ParseError>
Handles conversion when the value is missing from the source. Read more
impl Eq for Connection
impl StructuralPartialEq for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
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.