pub struct ClientConfig {
pub id: String,
pub name: String,
pub psk: [u8; 32],
pub vpn_ip: Ipv4Addr,
pub enabled: bool,
pub created_at: DateTime<Utc>,
pub stats: ClientStats,
}Expand description
Client configuration and credentials
Fields§
§id: StringUnique client ID (UUID-like hex string)
name: StringHuman-readable name
psk: [u8; 32]Pre-shared key (32 bytes, base64-encoded in JSON).
SECURITY: never return ClientConfig directly from API handlers — use ClientResponse
instead, which explicitly excludes this field.
vpn_ip: Ipv4AddrAssigned static VPN IP
enabled: boolWhether client is enabled
created_at: DateTime<Utc>Creation timestamp
stats: ClientStatsTraffic and connection statistics
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 ClientConfig
impl Debug for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfig
impl<'de> Deserialize<'de> for ClientConfig
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
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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