Struct Multisample

Source
pub struct Multisample<'a> { /* private fields */ }
Expand description

A multi-sample mapping for an instrument

Implementations§

Source§

impl<'a> Multisample<'a>

Source

pub fn to_owned(self) -> Multisample<'static>

Clones any borrowed data and returns a copy with a 'static lifetime

Source

pub fn with_name(self, name: impl Into<Cow<'a, str>>) -> Self

Set the name of the multi-sampled instrument

Source

pub fn with_generator(self, generator: impl Into<Cow<'a, str>>) -> Self

Set the name of the software tool generating the mapping

Source

pub fn with_category(self, category: impl Into<Cow<'a, str>>) -> Self

Set the general kind of instrument this is

Source

pub fn with_creator(self, creator: impl Into<Cow<'a, str>>) -> Self

Set the user who is creating the mapping

Source

pub fn with_description(self, description: impl Into<Cow<'a, str>>) -> Self

Provide a longer-form text description of the instrument

Source

pub fn with_keywords<S: Into<Cow<'a, str>>>( self, keywords: impl IntoIterator<Item = S>, ) -> Self

Set the keywords associated with this instrument

Source

pub fn with_groups(self, groups: impl IntoIterator<Item = Group<'a>>) -> Self

Set the list of sample groups

Source

pub fn with_samples(self, samples: impl IntoIterator<Item = Sample<'a>>) -> Self

Set the list of sample mappings

Source

pub fn name(&self) -> &str

Name of the multi-sampled instrument

Source

pub fn generator(&self) -> &str

Name of the software tool generating the mapping

Source

pub fn category(&self) -> &str

General kind of instrument

Source

pub fn creator(&self) -> &str

User who created the mapping

Source

pub fn description(&self) -> &str

Longer-form text description of the instrument

Source

pub fn keywords(&self) -> &[Cow<'a, str>]

Keywords to aid in finding and organizing instruments

Source

pub fn groups(&self) -> &[Group<'_>]

Groups that can be referenced from the sample list

Source

pub fn samples(&self) -> &[Sample<'_>]

Sample mappings in this instrument

Trait Implementations§

Source§

impl<'a> Debug for Multisample<'a>

Source§

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

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

impl<'a> Default for Multisample<'a>

Source§

fn default() -> Multisample<'a>

Returns the “default value” for a type. Read more
Source§

impl<'de: 'a, 'a> Deserialize<'de> for Multisample<'a>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'a> Serialize for Multisample<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Multisample<'a>

§

impl<'a> RefUnwindSafe for Multisample<'a>

§

impl<'a> Send for Multisample<'a>

§

impl<'a> Sync for Multisample<'a>

§

impl<'a> Unpin for Multisample<'a>

§

impl<'a> UnwindSafe for Multisample<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,