Struct ggez::audio::SoundData [−][src]
pub struct SoundData(_);
Static sound data stored in memory. It is Arc'ed, so cheap to clone.
Methods
impl SoundData
[src]
impl SoundData
pub fn new<P: AsRef<Path>>(context: &mut Context, path: P) -> GameResult<Self>
[src]
pub fn new<P: AsRef<Path>>(context: &mut Context, path: P) -> GameResult<Self>
Create a new SoundData from the file at the given path.
pub fn from_bytes(data: &[u8]) -> Self
[src]
pub fn from_bytes(data: &[u8]) -> Self
Copies the data in the given slice into a new SoundData object.
pub fn from_read<R>(reader: &mut R) -> GameResult<Self> where
R: Read,
[src]
pub fn from_read<R>(reader: &mut R) -> GameResult<Self> where
R: Read,
Creates a SoundData from any Read object; this involves copying it into a buffer.
Trait Implementations
impl Clone for SoundData
[src]
impl Clone for SoundData
fn clone(&self) -> SoundData
[src]
fn clone(&self) -> SoundData
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for SoundData
[src]
impl Debug for SoundData
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Arc<[u8]>> for SoundData
[src]
impl From<Arc<[u8]>> for SoundData
impl From<Vec<u8>> for SoundData
[src]
impl From<Vec<u8>> for SoundData
impl From<Box<[u8]>> for SoundData
[src]
impl From<Box<[u8]>> for SoundData
impl AsRef<[u8]> for SoundData
[src]
impl AsRef<[u8]> for SoundData