[][src]Struct floaout::format::bub::Bubble

pub struct Bubble {
    pub version: u8,
    pub bub_field_size: BubbleFieldSize,
    pub color: Color,
    pub blocks: u64,
    pub sampling_rate: u32,
    pub bits_per_sample: u16,
    pub name_size: u8,
    pub name: String,
    pub overall: BubbleField,
}

Details of the Bubble file.

Fields

version: u8

This is the number of Bubble version.

bub_field_size: BubbleFieldSize

This includes length, width and height.

color: Color

This includes red, green, blue.

blocks: u64

This is number of block.

sampling_rate: u32

Sampling Rate

bits_per_sample: u16

Bits Per Sample

name_size: u8

Bubble Name Size

name: String

Name of Bubble

overall: BubbleField

Overall of Bubble field

Methods

impl Bubble[src]

pub fn from_bub_field_size_and_bits_per_sample(
    bub_field_size: BubbleFieldSize,
    bits_per_sample: u16
) -> Self
[src]

This method casts Bubble field size and bits per sample to Bubble.

Examples

use floaout::format::bub::Bubble;
 
let bub = Bubble::from_bub_field_size_and_bits_per_sample((0u8, 0u8, 0u8).into(), 32);
 
assert_eq!(
    bub,
    Bubble {
        bub_field_size: (0u8, 0u8, 0u8).into(),
        bits_per_sample: 32,
        ..Default::default()
    }
);

Trait Implementations

impl Clone for Bubble[src]

impl Debug for Bubble[src]

impl Default for Bubble[src]

impl Eq for Bubble[src]

impl From<Floaout> for Bubble[src]

impl Hash for Bubble[src]

impl Ord for Bubble[src]

impl PartialEq<Bubble> for Bubble[src]

impl PartialOrd<Bubble> for Bubble[src]

impl<'_, R: Read + ?Sized> ReadBlock<&'_ Bubble, BubbleBlock> for R[src]

impl<R: Read + Seek> ReadFmt<Bubble, BubbleBlocks> for BufReader<R>[src]

impl StructuralEq for Bubble[src]

impl StructuralPartialEq for Bubble[src]

impl TryFrom<Wav> for Bubble[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryInto<Wav> for Bubble[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl<'_, '_, W: Write + ?Sized> WriteBlock<&'_ Bubble, &'_ BubbleBlock> for W[src]

impl<W: Write> WriteFmt<Bubble, BubbleBlocks> for BufWriter<W>[src]

Auto Trait Implementations

impl RefUnwindSafe for Bubble

impl Send for Bubble

impl Sync for Bubble

impl Unpin for Bubble

impl UnwindSafe for Bubble

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.