Skip to main content

TagInner

Struct TagInner 

Source
pub struct TagInner<'a> { /* private fields */ }
Expand description

The inner data of a parsed tag.

This struct is primarily useful for the crate::Writer, but can be used outside of writing, if the user needs to have custom access on the byte-slice content of the tag. The slice the inner data holds may come from a data source provided during parsing, or may be an owned Vec<u8> if the tag was mutated or constructed using a builder method for the tag. When the inner data is a byte slice of parsed data, it may be a slice of the rest of the playlist from where the tag was found; however, the Self::value method ensures that only the relevant bytes for this line are provided.

Implementations§

Source§

impl<'a> TagInner<'a>

Source

pub fn value(&self) -> &[u8]

Provides the value of the inner data.

The method ensures that only data from this line is provided as the value (even if the slice of borrowed data extends past the line until the end of the playlist).

Trait Implementations§

Source§

impl<'a> Debug for TagInner<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TagInner<'a>

§

impl<'a> RefUnwindSafe for TagInner<'a>

§

impl<'a> Send for TagInner<'a>

§

impl<'a> Sync for TagInner<'a>

§

impl<'a> Unpin for TagInner<'a>

§

impl<'a> UnsafeUnpin for TagInner<'a>

§

impl<'a> UnwindSafe for TagInner<'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.