#[non_exhaustive]
pub struct NodeConfig { pub address: SocketAddr, pub authorization: String, pub resume: Option<Resume>, pub shard_count: u64, pub user_id: Id<UserMarker>, }
Expand description

The configuration that a Node uses to connect to a Lavalink server.

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.
address: SocketAddr

The address of the node.

authorization: String

The password to use when authenticating.

resume: Option<Resume>

The details for resuming a Lavalink session, if any.

Set this to None to disable resume capability.

shard_count: u64

The number of shards in use by the bot.

user_id: Id<UserMarker>

The user ID of the bot.

Implementations

Create a new configuration for connecting to a node via Node::connect.

If adding a node through the Lavalink client then you don’t need to do this yourself.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more