pub struct Node {
pub id: usize,
pub session_id: ArcSwap<String>,
pub websocket_address: String,
pub http: Http,
pub events: Events,
pub is_running: AtomicBool,
pub user_id: UserId,
pub cpu: ArcSwap<Cpu>,
pub memory: ArcSwap<Memory>,
/* private fields */
}
Expand description
A Lavalink server node.
Fields§
§id: usize
§session_id: ArcSwap<String>
§websocket_address: String
§http: Http
§events: Events
§is_running: AtomicBool
§user_id: UserId
§cpu: ArcSwap<Cpu>
§memory: ArcSwap<Memory>
Implementations§
Source§impl Node
impl Node
Sourcepub async fn connect(
&self,
lavalink_client: LavalinkClient,
) -> Result<(), LavalinkError>
pub async fn connect( &self, lavalink_client: LavalinkClient, ) -> Result<(), LavalinkError>
Create a connection to the Lavalink server.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Node
impl !RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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