pub enum NodeDistributionStrategy {
Sharded,
RoundRobin(Arc<AtomicUsize>),
MainFallback,
LowestLoad,
HighestFreeMemory,
Custom(fn(_: &LavalinkClient, _: GuildId) -> BoxFuture<'_, Arc<Node>>),
CustomPython(PyObject),
}
Variants§
Sharded
RoundRobin(Arc<AtomicUsize>)
MainFallback
LowestLoad
HighestFreeMemory
Custom(fn(_: &LavalinkClient, _: GuildId) -> BoxFuture<'_, Arc<Node>>)
CustomPython(PyObject)
Implementations§
Source§impl NodeDistributionStrategy
impl NodeDistributionStrategy
pub fn new() -> Self
pub fn sharded() -> Self
pub fn round_robin() -> Self
pub fn main_fallback() -> Self
pub fn lowest_load() -> Self
pub fn highest_free_memory() -> Self
pub fn custom( func: fn(_: &LavalinkClient, _: GuildId) -> BoxFuture<'_, Arc<Node>>, ) -> NodeDistributionStrategy
Trait Implementations§
Source§impl Clone for NodeDistributionStrategy
impl Clone for NodeDistributionStrategy
Source§fn clone(&self) -> NodeDistributionStrategy
fn clone(&self) -> NodeDistributionStrategy
Returns a copy of the value. Read more
1.0.0 · 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 NodeDistributionStrategy
impl Debug for NodeDistributionStrategy
Source§impl Default for NodeDistributionStrategy
impl Default for NodeDistributionStrategy
Source§fn default() -> NodeDistributionStrategy
fn default() -> NodeDistributionStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NodeDistributionStrategy
impl !RefUnwindSafe for NodeDistributionStrategy
impl Send for NodeDistributionStrategy
impl Sync for NodeDistributionStrategy
impl Unpin for NodeDistributionStrategy
impl UnwindSafe for NodeDistributionStrategy
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