Skip to main content

MessageBuilder

Struct MessageBuilder 

Source
pub struct MessageBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> MessageBuilder<'a>

Source

pub fn new() -> Self

Source

pub fn progress_changed_raw( self, position: Option<&Time>, duration: Option<&Time>, ) -> ConstructedMessage<'a>

Source

pub fn progress_changed( self, position: Time, duration: Time, ) -> ConstructedMessage<'a>

Source

pub fn set_progress_update_interval_raw( self, interval: Option<&Time>, ) -> ConstructedMessage<'a>

Source

pub fn set_progress_update_interval( self, interval: Time, ) -> ConstructedMessage<'a>

Source

pub fn volume_changed(self, volume: f32) -> ConstructedMessage<'a>

Source

pub fn speed_changed(self, speed: f32) -> ConstructedMessage<'a>

Source

pub fn playback_state_changed( self, state: PlaybackState, ) -> ConstructedMessage<'a>

Source

pub fn change_track( self, id: Option<u32>, typ: MediaTrackType, ) -> ConstructedMessage<'a>

Source

pub fn add_subtitle_source( self, url: &str, select: bool, name: Option<&str>, ) -> ConstructedMessage<'a>

Source

pub fn companion_hello_request(self) -> ConstructedMessage<'a>

Source

pub fn companion_hello_response( self, provider_id: u16, ) -> ConstructedMessage<'a>

Source

pub fn companion_resource_info_request( self, request_id: u32, resource_id: u32, ) -> ConstructedMessage<'a>

Source

pub fn companion_resource_info_response( self, request_id: u32, content_type: &str, size: Option<u64>, ) -> ConstructedMessage<'a>

Source

pub fn sender_introduction( self, device_info: &DeviceInfo, ) -> ConstructedMessage<'a>

Source

pub fn start_mirroring_session(self, session_id: u16) -> ConstructedMessage<'a>

Source

pub fn mirroring_session_description( self, session_id: u16, sdp: &str, ) -> ConstructedMessage<'a>

Source

pub fn stop_playback(self) -> ConstructedMessage<'a>

Source

pub fn from_play_stripped( self, play: &Load<'_>, ) -> Option<ConstructedMessage<'a>>

Source

pub fn from_queue_insert_stripped( self, insert: &QueueInsert<'_>, ) -> Option<ConstructedMessage<'a>>

Source

pub fn load_single(self, item: MediaItem<'_>) -> ConstructedMessage<'a>

Source

pub fn load_queue<'m>( self, items: impl Iterator<Item = MediaItem<'m>>, start_index: Option<u8>, ) -> ConstructedMessage<'a>

Source

pub fn queue_remove(self, position: QueuePosition) -> ConstructedMessage<'a>

Source

pub fn queue_insert( self, item: MediaItem<'_>, position: QueuePosition, ) -> ConstructedMessage<'a>

Source

pub fn queue_select(self, position: QueuePosition) -> ConstructedMessage<'a>

Source

pub fn tracks_available( self, tracks: impl Iterator<Item = MediaTrack>, ) -> ConstructedMessage<'a>

Source

pub fn receiver_introduction( self, device_info: &DeviceInfo, supported_streaming_protocols: impl Iterator<Item = &'static str>, supported_containers: impl Iterator<Item = &'static str>, supported_video_formats: impl Iterator<Item = &'static str>, supported_audio_formats: impl Iterator<Item = &'static str>, supported_subtitle_formats: impl Iterator<Item = &'static str>, supported_hdr_formats: impl Iterator<Item = &'static str>, supported_image_formats: impl Iterator<Item = &'static str>, supports_external_subtitles: bool, supports_mirroring: bool, volume_step_interval: f32, ) -> ConstructedMessage<'a>

Source

pub fn error( self, packet_num: Option<u32>, kind: ErrorKind, ) -> ConstructedMessage<'a>

Source

pub fn companion_resource_request( self, request_id: u32, resource_id: u32, read_head: Option<ResourceReadHead>, ) -> ConstructedMessage<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for MessageBuilder<'a>

§

impl<'a> RefUnwindSafe for MessageBuilder<'a>

§

impl<'a> Send for MessageBuilder<'a>

§

impl<'a> Sync for MessageBuilder<'a>

§

impl<'a> Unpin for MessageBuilder<'a>

§

impl<'a> UnsafeUnpin for MessageBuilder<'a>

§

impl<'a> UnwindSafe for MessageBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.