#[non_exhaustive]pub struct ClientConfig {
pub protocol: ServerProtocol,
pub host: String,
pub port: u16,
pub credentials: Credentials,
pub server: String,
pub character: String,
pub include_raw: bool,
pub channels: Option<HashSet<ChannelName>>,
pub reconnect_delay: Duration,
}Expand description
Connection and logging preferences.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.protocol: ServerProtocolServer family and protocol generation.
host: StringLogin server hostname or address.
port: u16Login server UDP port.
credentials: CredentialsLogin credentials, redacted from diagnostics and zeroized on drop.
server: StringWorld-server display name selected after login.
character: StringCharacter selected on the world server.
include_raw: boolWhether decoded records retain raw packet representations.
channels: Option<HashSet<ChannelName>>None logs every channel; an empty set logs no decoded chat.
reconnect_delay: DurationDelay before starting a fresh session after a recoverable failure.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn new(
user: impl Into<String>,
pass: impl Into<String>,
server: impl Into<String>,
character: impl Into<String>,
) -> Self
pub fn new( user: impl Into<String>, pass: impl Into<String>, server: impl Into<String>, character: impl Into<String>, ) -> Self
Configure a character with the default login endpoint and all chat channels.
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 moreAuto 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