pub struct MediaPlaybackClientView<'a> { /* private fields */ }Expand description
Per-exchange view onto the MediaPlayback cluster’s client operations. Returned by MediaPlaybackClient::media_playback. Each method consumes the view (and therefore the underlying crate::transport::exchange::Exchange) — one exchange is one IM transaction.
Implementations§
Source§impl<'a> MediaPlaybackClientView<'a>
impl<'a> MediaPlaybackClientView<'a>
pub async fn play( self, endpoint: u16, ) -> Result<PlaybackResponseHandle<'a>, Error>
pub async fn pause( self, endpoint: u16, ) -> Result<PlaybackResponseHandle<'a>, Error>
pub async fn stop( self, endpoint: u16, ) -> Result<PlaybackResponseHandle<'a>, Error>
pub async fn start_over( self, endpoint: u16, ) -> Result<PlaybackResponseHandle<'a>, Error>
pub async fn previous( self, endpoint: u16, ) -> Result<PlaybackResponseHandle<'a>, Error>
pub async fn next( self, endpoint: u16, ) -> Result<PlaybackResponseHandle<'a>, Error>
pub async fn rewind<F>(
self,
endpoint: u16,
request: F,
) -> Result<PlaybackResponseHandle<'a>, Error>where
F: FnMut(RewindRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn fast_forward<F>(
self,
endpoint: u16,
request: F,
) -> Result<PlaybackResponseHandle<'a>, Error>where
F: FnMut(FastForwardRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn skip_forward<F>(
self,
endpoint: u16,
request: F,
) -> Result<PlaybackResponseHandle<'a>, Error>where
F: FnMut(SkipForwardRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn skip_backward<F>(
self,
endpoint: u16,
request: F,
) -> Result<PlaybackResponseHandle<'a>, Error>where
F: FnMut(SkipBackwardRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn seek<F>(
self,
endpoint: u16,
request: F,
) -> Result<PlaybackResponseHandle<'a>, Error>where
F: FnMut(SeekRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn activate_audio_track<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(ActivateAudioTrackRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn activate_text_track<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(ActivateTextTrackRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn deactivate_text_track(self, endpoint: u16) -> Result<(), Error>
pub async fn current_state_read( self, endpoint: u16, ) -> Result<PlaybackStateEnum, Error>
pub async fn start_time_read( self, endpoint: u16, ) -> Result<Maybe<u64, AsNullable>, Error>
pub async fn duration_read( self, endpoint: u16, ) -> Result<Maybe<u64, AsNullable>, Error>
Sourcepub async fn sampled_position_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<Maybe<PlaybackPositionStruct<'_>, AsNullable>, Error>) -> R,
) -> Result<R, Error>
pub async fn sampled_position_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<Maybe<PlaybackPositionStruct<'_>, AsNullable>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
pub async fn playback_speed_read(self, endpoint: u16) -> Result<f32, Error>
pub async fn seek_range_end_read( self, endpoint: u16, ) -> Result<Maybe<u64, AsNullable>, Error>
pub async fn seek_range_start_read( self, endpoint: u16, ) -> Result<Maybe<u64, AsNullable>, Error>
Sourcepub async fn active_audio_track_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<Maybe<TrackStruct<'_>, AsNullable>, Error>) -> R,
) -> Result<R, Error>
pub async fn active_audio_track_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<Maybe<TrackStruct<'_>, AsNullable>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn available_audio_tracks_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<Maybe<TLVContainer<'_, TrackStruct<'_>, ArrayContainer>, AsNullable>, Error>) -> R,
) -> Result<R, Error>
pub async fn available_audio_tracks_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<Maybe<TLVContainer<'_, TrackStruct<'_>, ArrayContainer>, AsNullable>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn active_text_track_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<Maybe<TrackStruct<'_>, AsNullable>, Error>) -> R,
) -> Result<R, Error>
pub async fn active_text_track_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<Maybe<TrackStruct<'_>, AsNullable>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn available_text_tracks_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<Maybe<TLVContainer<'_, TrackStruct<'_>, ArrayContainer>, AsNullable>, Error>) -> R,
) -> Result<R, Error>
pub async fn available_text_tracks_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<Maybe<TLVContainer<'_, TrackStruct<'_>, ArrayContainer>, AsNullable>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn generated_command_list_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R,
) -> Result<R, Error>
pub async fn generated_command_list_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn accepted_command_list_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R,
) -> Result<R, Error>
pub async fn accepted_command_list_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn attribute_list_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R,
) -> Result<R, Error>
pub async fn attribute_list_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
pub async fn feature_map_read(self, endpoint: u16) -> Result<u32, Error>
pub async fn cluster_revision_read(self, endpoint: u16) -> Result<u16, Error>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MediaPlaybackClientView<'a>
impl<'a> !Send for MediaPlaybackClientView<'a>
impl<'a> !Sync for MediaPlaybackClientView<'a>
impl<'a> !UnwindSafe for MediaPlaybackClientView<'a>
impl<'a> Freeze for MediaPlaybackClientView<'a>
impl<'a> Unpin for MediaPlaybackClientView<'a>
impl<'a> UnsafeUnpin for MediaPlaybackClientView<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more