[][src]Enum metaflac::block::Block

pub enum Block {
    StreamInfo(StreamInfo),
    Application(Application),
    CueSheet(CueSheet),
    Padding(u32),
    Picture(Picture),
    SeekTable(SeekTable),
    VorbisComment(VorbisComment),
    Unknown((u8, Vec<u8>)),
}

The parsed content of a metadata block.

Variants

StreamInfo(StreamInfo)

A value containing a parsed streaminfo block.

Application(Application)

A value containing a parsed application block.

CueSheet(CueSheet)

A value containing a parsed cuesheet block.

Padding(u32)

A value containing the number of bytes of padding.

Picture(Picture)

A value containing a parsed picture block.

SeekTable(SeekTable)

A value containing a parsed seektable block.

VorbisComment(VorbisComment)

A value containing a parsed vorbis comment block.

Unknown((u8, Vec<u8>))

An value containing the bytes of an unknown block.

Methods

impl Block[src]

pub fn read_from(reader: &mut dyn Read) -> Result<(bool, u32, Block)>[src]

Attempts to read a block from the reader. Returns a tuple containing a boolean indicating if the block was the last block, the length of the block in bytes, and the new Block.

pub fn write_to(&self, is_last: bool, writer: &mut dyn Write) -> Result<u32>[src]

Attemps to write the block to the writer. Returns the length of the block in bytes.

pub fn block_type(&self) -> BlockType[src]

Returns the corresponding block type byte for the block.

Trait Implementations

impl Clone for Block[src]

impl Debug for Block[src]

Auto Trait Implementations

impl RefUnwindSafe for Block

impl Send for Block

impl Sync for Block

impl Unpin for Block

impl UnwindSafe for Block

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.