pub struct PlayerObject { /* private fields */ }Expand description
Represents an instance in a voice channel
Implementations§
Source§impl PlayerObject
impl PlayerObject
Sourcepub async fn register_event_handler(
&mut self,
event_handler: impl CharcoalEventHandler + Send + 'static,
)
pub async fn register_event_handler( &mut self, event_handler: impl CharcoalEventHandler + Send + 'static, )
Register an error callback that will be called if an error occurs on this PlayerObject
Source§impl PlayerObject
impl PlayerObject
Trait Implementations§
Source§impl ChannelManager for PlayerObject
impl ChannelManager for PlayerObject
Source§fn join_channel<'life0, 'async_trait>(
&'life0 mut self,
voice_channel_id: String,
create_job: bool,
) -> Pin<Box<dyn Future<Output = Result<(), CreateJobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn join_channel<'life0, 'async_trait>(
&'life0 mut self,
voice_channel_id: String,
create_job: bool,
) -> Pin<Box<dyn Future<Output = Result<(), CreateJobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create job on Hearth server for this PlayerObject
Source§fn exit_channel<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ChannelManagerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exit_channel<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ChannelManagerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Exit voice channel
Source§impl Player for PlayerObject
impl Player for PlayerObject
Source§impl TrackManager for PlayerObject
impl TrackManager for PlayerObject
Source§fn set_playback_volume<'life0, 'async_trait>(
&'life0 self,
playback_volume: f32,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_playback_volume<'life0, 'async_trait>(
&'life0 self,
playback_volume: f32,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set playback volume
Source§fn force_stop_loop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn force_stop_loop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop looping
Source§fn loop_indefinitely<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn loop_indefinitely<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loop forever
Source§fn loop_x_times<'life0, 'async_trait>(
&'life0 self,
times: usize,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn loop_x_times<'life0, 'async_trait>(
&'life0 self,
times: usize,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loop X amount of times
Source§fn seek_to_position<'life0, 'async_trait>(
&'life0 self,
position: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn seek_to_position<'life0, 'async_trait>(
&'life0 self,
position: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Seek to position on track from start
Source§fn resume_playback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn resume_playback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Resume playback
Source§fn pause_playback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pause_playback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pause playback
Source§fn get_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), TrackActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get metadata for track currently being played
Auto Trait Implementations§
impl Freeze for PlayerObject
impl !RefUnwindSafe for PlayerObject
impl Send for PlayerObject
impl Sync for PlayerObject
impl Unpin for PlayerObject
impl !UnwindSafe for PlayerObject
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