Struct id3::frame::Chapter

source ·
pub struct Chapter {
    pub element_id: String,
    pub start_time: u32,
    pub end_time: u32,
    pub start_offset: u32,
    pub end_offset: u32,
    pub frames: Vec<Frame>,
}

Fields§

§element_id: String§start_time: u32§end_time: u32§start_offset: u32§end_offset: u32§frames: Vec<Frame>

Trait Implementations§

source§

impl Clone for Chapter

source§

fn clone(&self) -> Chapter

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Chapter

source§

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

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

impl Display for Chapter

source§

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

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

impl Extend<Frame> for Chapter

source§

fn extend<I: IntoIterator<Item = Frame>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl From<Chapter> for Frame

source§

fn from(c: Chapter) -> Self

Converts to this type from the input type.
source§

impl Hash for Chapter

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Chapter

source§

fn cmp(&self, other: &Chapter) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Chapter

source§

fn eq(&self, other: &Chapter) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Chapter

source§

fn partial_cmp(&self, other: &Chapter) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl TagLike for Chapter

source§

fn get(&self, id: impl AsRef<str>) -> Option<&Frame>

Returns a reference to the first frame with the specified identifier. Read more
source§

fn add_frame(&mut self, new_frame: impl Into<Frame>) -> Option<Frame>

Adds the frame to the tag, replacing and returning any conflicting frame. Read more
source§

fn set_text(&mut self, id: impl AsRef<str>, text: impl Into<String>)

Adds a text frame. Read more
source§

fn set_text_values( &mut self, id: impl AsRef<str>, texts: impl IntoIterator<Item = impl Into<String>> )

Panics Read more
source§

fn remove(&mut self, id: impl AsRef<str>) -> Vec<Frame>

Remove all frames with the specified identifier and return them. Read more
source§

fn year(&self) -> Option<i32>

Returns the year (TYER). Returns None if the year frame could not be found or if it could not be parsed. Read more
source§

fn set_year(&mut self, year: i32)

Sets the year (TYER). Read more
source§

fn remove_year(&mut self)

Removes the year (TYER). Read more
source§

fn date_recorded(&self) -> Option<Timestamp>

Return the content of the TRDC frame, if any Read more
source§

fn set_date_recorded(&mut self, timestamp: Timestamp)

Sets the content of the TDRC frame Read more
source§

fn remove_date_recorded(&mut self)

Remove the content of the TDRC frame Read more
source§

fn date_released(&self) -> Option<Timestamp>

Return the content of the TDRL frame, if any Read more
source§

fn set_date_released(&mut self, timestamp: Timestamp)

Sets the content of the TDRL frame Read more
source§

fn remove_date_released(&mut self)

Remove the content of the TDRL frame Read more
source§

fn original_date_released(&self) -> Option<Timestamp>

Return the content of the TDOR frame, if any Read more
source§

fn set_original_date_released(&mut self, timestamp: Timestamp)

Sets the content of the TDOR frame Read more
source§

fn remove_original_date_released(&mut self)

Remove the content of the TDOR frame Read more
source§

fn artist(&self) -> Option<&str>

Returns the artist (TPE1). Read more
source§

fn artists(&self) -> Option<Vec<&str>>

Returns the (potential) multiple artists (TPE1).
source§

fn set_artist(&mut self, artist: impl Into<String>)

Sets the artist (TPE1). Read more
source§

fn remove_artist(&mut self)

Removes the artist (TPE1). Read more
source§

fn album_artist(&self) -> Option<&str>

Sets the album artist (TPE2). Read more
source§

fn set_album_artist(&mut self, album_artist: impl Into<String>)

Sets the album artist (TPE2). Read more
source§

fn remove_album_artist(&mut self)

Removes the album artist (TPE2). Read more
source§

fn album(&self) -> Option<&str>

Returns the album (TALB). Read more
source§

fn set_album(&mut self, album: impl Into<String>)

Sets the album (TALB). Read more
source§

fn remove_album(&mut self)

Removes the album (TALB). Read more
source§

fn title(&self) -> Option<&str>

Returns the title (TIT2). Read more
source§

fn set_title(&mut self, title: impl Into<String>)

Sets the title (TIT2). Read more
source§

fn remove_title(&mut self)

Removes the title (TIT2). Read more
source§

fn duration(&self) -> Option<u32>

Returns the duration (TLEN). Read more
source§

fn set_duration(&mut self, duration: u32)

Sets the duration (TLEN). Read more
source§

fn remove_duration(&mut self)

Removes the duration (TLEN). Read more
source§

fn genre(&self) -> Option<&str>

Returns the plain genre (TCON) text. Read more
source§

fn genre_parsed(&self) -> Option<Cow<'_, str>>

Returns the genre (TCON) with ID3v1 genre indices resolved. Read more
source§

fn genres(&self) -> Option<Vec<&str>>

Returns the (potential) multiple plain genres (TCON).
source§

fn set_genre(&mut self, genre: impl Into<String>)

Sets the plain genre (TCON). Read more
source§

fn remove_genre(&mut self)

Removes the genre (TCON). Read more
source§

fn disc(&self) -> Option<u32>

Returns the disc number (TPOS). Read more
source§

fn set_disc(&mut self, disc: u32)

Sets the disc (TPOS). Read more
source§

fn remove_disc(&mut self)

Removes the disc number (TPOS). Read more
source§

fn total_discs(&self) -> Option<u32>

Returns the total number of discs (TPOS). Read more
source§

fn set_total_discs(&mut self, total_discs: u32)

Sets the total number of discs (TPOS). Read more
source§

fn remove_total_discs(&mut self)

Removes the total number of discs (TPOS). Read more
source§

fn track(&self) -> Option<u32>

Returns the track number (TRCK). Read more
source§

fn set_track(&mut self, track: u32)

Sets the track (TRCK). Read more
source§

fn remove_track(&mut self)

Removes the track number (TRCK). Read more
source§

fn total_tracks(&self) -> Option<u32>

Returns the total number of tracks (TRCK). Read more
source§

fn set_total_tracks(&mut self, total_tracks: u32)

Sets the total number of tracks (TRCK). Read more
source§

fn remove_total_tracks(&mut self)

Removes the total number of tracks (TCON). Read more
source§

fn add_extended_text( &mut self, description: impl Into<String>, value: impl Into<String> )

👎Deprecated: Use add_frame(frame::ExtendedText{ .. })
Adds a user defined text frame (TXXX). Read more
source§

fn remove_extended_text( &mut self, description: Option<&str>, value: Option<&str> )

Removes the user defined text frame (TXXX) with the specified key and value. Read more
source§

fn add_picture(&mut self, picture: Picture)

👎Deprecated: Use add_frame(frame::Picture{ .. })
Adds a picture frame (APIC). Any other pictures with the same type will be removed from the tag. Read more
source§

fn remove_picture_by_type(&mut self, picture_type: PictureType)

Removes all pictures of the specified type. Read more
source§

fn remove_all_pictures(&mut self)

Removes all pictures. Read more
source§

fn add_comment(&mut self, comment: Comment)

👎Deprecated: Use add_frame(frame::Comment{ .. })
Adds a comment (COMM). Read more
source§

fn remove_comment(&mut self, description: Option<&str>, text: Option<&str>)

Removes the comment (COMM) with the specified key and value. Read more
source§

fn add_encapsulated_object( &mut self, description: impl Into<String>, mime_type: impl Into<String>, filename: impl Into<String>, data: impl Into<Vec<u8>> )

👎Deprecated: Use add_frame(frame::EncapsulatedObject{ .. })
Adds an encapsulated object frame (GEOB). Read more
source§

fn remove_encapsulated_object( &mut self, description: Option<&str>, mime_type: Option<&str>, filename: Option<&str>, data: Option<&[u8]> )

Removes the encapsulated object frame (GEOB) with the specified key, MIME type, filename and data. Read more
source§

fn add_lyrics(&mut self, lyrics: Lyrics)

👎Deprecated: Use add_frame(frame::Lyrics{ .. })
Sets the lyrics (USLT). Read more
source§

fn remove_all_lyrics(&mut self)

Removes the lyrics text (USLT) from the tag. Read more
source§

fn add_synchronised_lyrics(&mut self, lyrics: SynchronisedLyrics)

👎Deprecated: Use add_frame(frame::SynchronisedLyrics{ .. })
Adds a synchronised lyrics frame (SYLT). Read more
source§

fn remove_all_synchronised_lyrics(&mut self)

Removes all synchronised lyrics (SYLT) frames from the tag. Read more
source§

fn remove_all_chapters(&mut self)

/// Removes all chapters (CHAP) frames from the tag. Read more
source§

fn remove_all_tables_of_contents(&mut self)

/// Removes all tables of contents (CTOC) frames from the tag. Read more
source§

impl Eq for Chapter

source§

impl StructuralPartialEq for Chapter

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> 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,

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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.