pub struct PlayerMessage<'a> { /* private fields */ }Expand description
Have one type per entry in MediaLogRecord::Type Corresponds to kMessage
Implementations§
Source§impl<'a> PlayerMessage<'a>
impl<'a> PlayerMessage<'a>
Sourcepub fn builder(
level: impl Into<Cow<'a, str>>,
message: impl Into<Cow<'a, str>>,
) -> PlayerMessageBuilder<'a>
pub fn builder( level: impl Into<Cow<'a, str>>, message: impl Into<Cow<'a, str>>, ) -> PlayerMessageBuilder<'a>
Creates a builder for this type with the required parameters:
level: Keep in sync with MediaLogMessageLevel We are currently keeping the message level ‘error’ separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we’re going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type.message:
Sourcepub fn level(&self) -> &str
pub fn level(&self) -> &str
Keep in sync with MediaLogMessageLevel We are currently keeping the message level ‘error’ separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we’re going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type.
pub fn message(&self) -> &str
Trait Implementations§
Source§impl<'a> Clone for PlayerMessage<'a>
impl<'a> Clone for PlayerMessage<'a>
Source§fn clone(&self) -> PlayerMessage<'a>
fn clone(&self) -> PlayerMessage<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for PlayerMessage<'a>
impl<'a> Debug for PlayerMessage<'a>
Source§impl<'a> Default for PlayerMessage<'a>
impl<'a> Default for PlayerMessage<'a>
Source§fn default() -> PlayerMessage<'a>
fn default() -> PlayerMessage<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for PlayerMessage<'a>
impl<'de, 'a> Deserialize<'de> for PlayerMessage<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for PlayerMessage<'a>
impl<'a> RefUnwindSafe for PlayerMessage<'a>
impl<'a> Send for PlayerMessage<'a>
impl<'a> Sync for PlayerMessage<'a>
impl<'a> Unpin for PlayerMessage<'a>
impl<'a> UnsafeUnpin for PlayerMessage<'a>
impl<'a> UnwindSafe for PlayerMessage<'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
Mutably borrows from an owned value. Read more