[][src]Struct lavalink_rs::PlayParameters

pub struct PlayParameters {
    pub track: Track,
    pub replace: bool,
    pub start: u64,
    pub finish: u64,
    pub guild_id: u64,
    pub requester: Option<UserId>,
}

Fields

track: Trackreplace: boolstart: u64finish: u64guild_id: u64requester: Option<UserId>

Implementations

impl PlayParameters[src]

pub async fn start<'_>(
    self,
    socket: &'_ mut SplitSink<WsStream, TungsteniteMessage>
) -> LavalinkResult<()>
[src]

Starts playing the track.

pub async fn queue(
    self,
    client: Arc<Mutex<LavalinkClient>>
) -> LavalinkResult<()>
[src]

pub fn requester(&mut self, requester: impl Into<UserId>) -> &mut Self[src]

Sets the person that requested the song

pub fn replace(&mut self, replace: bool) -> &mut Self[src]

Sets if the current playing track should be replaced with this new one.

pub fn start_time(&mut self, start: Duration) -> &mut Self[src]

Sets the time the track will start at.

pub fn finish_time(&mut self, finish: Duration) -> &mut Self[src]

Sets the time the track will finish at.

Trait Implementations

impl Default for PlayParameters[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,