pub struct MusicPlayerClient<T> { /* private fields */ }Implementations§
Source§impl<T> MusicPlayerClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> MusicPlayerClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MusicPlayerClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn toggle_pause(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<PlayState>, Status>
pub async fn toggle_pause( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<PlayState>, Status>
Player Commands Toggle Pause/Play, returns the new state
pub async fn skip_next( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Empty>, Status>
pub async fn skip_previous( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Empty>, Status>
pub async fn get_progress( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<GetProgressResponse>, Status>
pub async fn volume_up( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<VolumeReply>, Status>
pub async fn volume_down( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<VolumeReply>, Status>
pub async fn speed_up( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<SpeedReply>, Status>
pub async fn speed_down( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<SpeedReply>, Status>
Sourcepub async fn toggle_gapless(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<GaplessState>, Status>
pub async fn toggle_gapless( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<GaplessState>, Status>
Toggle the gapless mdoe, returns the new state.
pub async fn seek_forward( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<PlayerTime>, Status>
pub async fn seek_backward( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<PlayerTime>, Status>
Sourcepub async fn play_specific(
&mut self,
request: impl IntoRequest<PlaylistPlaySpecific>,
) -> Result<Response<Empty>, Status>
pub async fn play_specific( &mut self, request: impl IntoRequest<PlaylistPlaySpecific>, ) -> Result<Response<Empty>, Status>
Playlist Commands Skip to a specific track in the playlist at the momemnt, the one set via “current_track_index”
Sourcepub async fn cycle_loop(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<PlaylistLoopMode>, Status>
pub async fn cycle_loop( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<PlaylistLoopMode>, Status>
Cycle the playlist loop mode, returns the new mode.
Sourcepub async fn add_to_playlist(
&mut self,
request: impl IntoRequest<PlaylistTracksToAdd>,
) -> Result<Response<Empty>, Status>
pub async fn add_to_playlist( &mut self, request: impl IntoRequest<PlaylistTracksToAdd>, ) -> Result<Response<Empty>, Status>
Add one or multiple tracks to the playlist
Sourcepub async fn remove_from_playlist(
&mut self,
request: impl IntoRequest<PlaylistTracksToRemove>,
) -> Result<Response<Empty>, Status>
pub async fn remove_from_playlist( &mut self, request: impl IntoRequest<PlaylistTracksToRemove>, ) -> Result<Response<Empty>, Status>
Remove one or multiple tracks from the playlist
Sourcepub async fn swap_tracks(
&mut self,
request: impl IntoRequest<PlaylistSwapTracks>,
) -> Result<Response<Empty>, Status>
pub async fn swap_tracks( &mut self, request: impl IntoRequest<PlaylistSwapTracks>, ) -> Result<Response<Empty>, Status>
Swap some tracks.
Sourcepub async fn get_playlist(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<PlaylistTracks>, Status>
pub async fn get_playlist( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<PlaylistTracks>, Status>
Get all tracks of the playlist.
Sourcepub async fn shuffle_playlist(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Empty>, Status>
pub async fn shuffle_playlist( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Empty>, Status>
Shuffle the playlist, returns the new playlist tracks.
Sourcepub async fn remove_deleted_tracks(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Empty>, Status>
pub async fn remove_deleted_tracks( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Empty>, Status>
Check for and remove deleted items from the playlist. Unlike shuffle, this will send Removal events
Sourcepub async fn reload_config(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Empty>, Status>
pub async fn reload_config( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Empty>, Status>
Misc Commands
pub async fn subscribe_server_updates( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Streaming<StreamUpdates>>, Status>
Trait Implementations§
Source§impl<T: Clone> Clone for MusicPlayerClient<T>
impl<T: Clone> Clone for MusicPlayerClient<T>
Source§fn clone(&self) -> MusicPlayerClient<T>
fn clone(&self) -> MusicPlayerClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for MusicPlayerClient<T>
impl<T> RefUnwindSafe for MusicPlayerClient<T>where
T: RefUnwindSafe,
impl<T> Send for MusicPlayerClient<T>where
T: Send,
impl<T> Sync for MusicPlayerClient<T>where
T: Sync,
impl<T> Unpin for MusicPlayerClient<T>where
T: Unpin,
impl<T> UnwindSafe for MusicPlayerClient<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request