Struct floaout::bub::BubMetadata
source · [−]pub struct BubMetadata {Show 13 fields
pub spec_version: u8,
pub bub_id: BubID,
pub bub_version: u16,
pub frames: u64,
pub samples_per_sec: f64,
pub lpcm_kind: LpcmKind,
pub bub_sample_kind: BubSampleKind,
pub name: String,
pub bub_state: BubState,
pub head_absolute_frame: u64,
pub bub_fns: BubFns,
pub foot_absolute_frame_plus_one: u64,
pub next_head_absolute_frame: Option<u64>,
}
Fields
spec_version: u8
Version of Bubble File Format Specification.
bub_id: BubID
Bubble ID
bub_version: u16
Version of Bubble
frames: u64
Number of frames
samples_per_sec: f64
Samples Per Sec
lpcm_kind: LpcmKind
Bits Per Sample
bub_sample_kind: BubSampleKind
Bubble LPCM Kind
name: String
Name of Bubble
bub_state: BubState
Bubble State
head_absolute_frame: u64
Head Absolute Frame
bub_fns: BubFns
Bubble Functions
foot_absolute_frame_plus_one: u64
Foot Absolute Frame Plus One
next_head_absolute_frame: Option<u64>
Next Head Absolute Frame
None
if 0.
Implementations
sourceimpl BubMetadata
impl BubMetadata
pub const fn new(
frames: u64,
first_head_absolute_frame: u64,
samples_per_sec: f64,
lpcm_kind: LpcmKind,
bub_sample_kind: BubSampleKind,
name: String
) -> Self
pub const fn frames(&self) -> u64
pub const fn lpcm_kind(&self) -> LpcmKind
pub const fn samples_per_sec(&self) -> f64
pub const fn secs(&self) -> u64
pub const fn millis(&self) -> u128
pub const fn micros(&self) -> u128
pub const fn nanos(&self) -> u128
pub fn set_as_head(&mut self, pos: u64)
pub fn set_as_body(&mut self)
pub fn set_as_stopped(&mut self)
pub fn set_as_ended(&mut self)
pub fn init_with_pos(&mut self, pos: u64)
pub fn read<R: Read>(reader: &mut R) -> Result<(Self, CRC<u32>)>
pub fn write<W: Write>(&self, writer: &mut W) -> Result<CRC<u32>>
Trait Implementations
sourceimpl Clone for BubMetadata
impl Clone for BubMetadata
sourcefn clone(&self) -> BubMetadata
fn clone(&self) -> BubMetadata
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BubMetadata
impl Debug for BubMetadata
sourceimpl PartialEq<BubMetadata> for BubMetadata
impl PartialEq<BubMetadata> for BubMetadata
sourcefn eq(&self, other: &BubMetadata) -> bool
fn eq(&self, other: &BubMetadata) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BubMetadata) -> bool
fn ne(&self, other: &BubMetadata) -> bool
This method tests for !=
.
impl Metadata for BubMetadata
impl StructuralPartialEq for BubMetadata
Auto Trait Implementations
impl RefUnwindSafe for BubMetadata
impl Send for BubMetadata
impl Sync for BubMetadata
impl Unpin for BubMetadata
impl UnwindSafe for BubMetadata
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more