SampleWithData

Struct SampleWithData 

Source
pub struct SampleWithData<'t, Api: Api>(/* private fields */);
Expand description

Sample over borrowed audio data.

Methods from Deref<Target = Sample<Api>>§

Source

pub fn length(&self) -> c_float

Returns the length, in seconds.

Equivalent to sys::ffi::playdate_sound_sample::getLength

Source

pub fn get_data<'t>(&'t self) -> SampleData<'t>

Trait Implementations§

Source§

impl<Api: Api> AsRef<Sample<Api>> for SampleWithData<'_, Api>

Source§

fn as_ref(&self) -> &Sample<Api>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'t, Api: Debug + Api> Debug for SampleWithData<'t, Api>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Api: Api> Deref for SampleWithData<'_, Api>

Source§

type Target = Sample<Api>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'t, Api> Freeze for SampleWithData<'t, Api>
where Api: Freeze,

§

impl<'t, Api> RefUnwindSafe for SampleWithData<'t, Api>
where Api: RefUnwindSafe,

§

impl<'t, Api> !Send for SampleWithData<'t, Api>

§

impl<'t, Api> !Sync for SampleWithData<'t, Api>

§

impl<'t, Api> Unpin for SampleWithData<'t, Api>
where Api: Unpin,

§

impl<'t, Api> !UnwindSafe for SampleWithData<'t, Api>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.