Struct keeshond_audio::Sound
source · [−]pub struct Sound { /* private fields */ }
Expand description
A resource representing a sound that can be played.
Trait Implementations
sourceimpl DataObject for Sound
impl DataObject for Sound
sourcefn folder_name() -> &'static str where
Self: Sized,
fn folder_name() -> &'static str where
Self: Sized,
The folder name that DataObjects of this type are stored in
sourcefn trust_policy() -> TrustPolicy
fn trust_policy() -> TrustPolicy
The TrustPolicy for this resource type, which determines what sources are allowed to load it.
sourcefn want_file(pathname: &str) -> bool where
Self: Sized,
fn want_file(pathname: &str) -> bool where
Self: Sized,
Determines whether or not a given file should be loaded while iterating through a package.
sourcefn from_package_source(
source: &mut Box<dyn Source>,
package_name: &str,
pathname: &str
) -> Result<Self, DataError> where
Self: Sized,
fn from_package_source(
source: &mut Box<dyn Source>,
package_name: &str,
pathname: &str
) -> Result<Self, DataError> where
Self: Sized,
A constructor that returns a new DataObject of this type given a path and a Source object.
sourcefn write(
&mut self,
package_name: &str,
pathname: &str,
source: &mut Box<dyn Source + 'static, Global>
) -> Result<(), DataError>
fn write(
&mut self,
package_name: &str,
pathname: &str,
source: &mut Box<dyn Source + 'static, Global>
) -> Result<(), DataError>
A function that writes the object to the given Source to save its data
sourcefn generation(&self) -> u64
fn generation(&self) -> u64
Implement this to support “generations” for detecting when the data for a given path is changed.
sourcefn set_generation(&mut self, generation: u64)
fn set_generation(&mut self, generation: u64)
Implement this to support “generations” for detecting when the data for a given path is changed.
Auto Trait Implementations
impl RefUnwindSafe for Sound
impl Send for Sound
impl Sync for Sound
impl Unpin for Sound
impl UnwindSafe for Sound
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
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more