Skip to main content

TagEdit

Struct TagEdit 

Source
pub struct TagEdit { /* private fields */ }
Expand description

A set of per-frame changes. Frames not mentioned are preserved.

Implementations§

Source§

impl TagEdit

Source

pub fn new() -> Self

An empty edit (a no-op).

Source

pub fn set(self, id: FrameId, value: impl Into<String>) -> Self

Sets a text frame. A blank value is treated as Change::Clear.

Source

pub fn clear(self, id: FrameId) -> Self

Removes a text frame.

Source

pub fn set_user_text( self, description: impl Into<String>, value: impl Into<String>, ) -> Self

Sets a user-defined text frame (TXXX) identified by description, for example "MOOD". A blank value removes it.

Source

pub fn clear_user_text(self, description: impl Into<String>) -> Self

Removes the user-defined text frame (TXXX) with this description.

Source

pub fn set_comment(self, text: impl Into<String>) -> Self

Sets the general comment (COMM with an empty description). Blank removes it.

Source

pub fn set_cover(self, picture: Picture) -> Self

Embeds picture as the front cover, replacing any existing front cover.

Source

pub fn clear_cover(self) -> Self

Removes the front cover.

Source

pub fn is_noop(&self) -> bool

True if applying this edit would change nothing.

Source§

impl TagEdit

Source

pub fn set_field(self, field: Field, value: impl Into<String>) -> Self

Sets a Field. A blank value removes it.

Source

pub fn set_track(self, track: Track) -> Self

Sets the track number (and total) in the TRCK frame.

Trait Implementations§

Source§

impl Clone for TagEdit

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TagEdit

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for TagEdit

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.