[][src]Struct nbs::Nbs

pub struct Nbs {
    pub header: Header,
    pub noteblocks: NoteBlocks,
    pub custom_instruments: CustomInstruments,
}

Fields

header: Headernoteblocks: NoteBlockscustom_instruments: CustomInstruments

Methods

impl Nbs[src]

pub fn from_componets(
    header: Header,
    noteblocks: NoteBlocks,
    custom_instruments: CustomInstruments
) -> Self
[src]

pub fn decode<R>(reader: &mut R) -> Result<Nbs, NbsError> where
    R: ReadStringExt
[src]

Decode a NBS buffer.

pub fn update(&mut self)[src]

This method updates some parts of the Header to match the rest of the file

pub fn encode<W>(&self, writer: &mut W) -> Result<(), NbsError> where
    W: WriteStringExt
[src]

Enocde a NBS buffer,

pub fn format(&self) -> NbsFormat[src]

Returns the NBS format for this

pub fn song_ticks(&self) -> i16[src]

Returns the song ticks.

pub fn song_length(&self) -> Duration[src]

Returns the song duration.

Auto Trait Implementations

impl RefUnwindSafe for Nbs

impl Send for Nbs

impl Sync for Nbs

impl Unpin for Nbs

impl UnwindSafe for Nbs

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