pub struct OrganUse {
pub organ: Symbol,
pub options: Vec<(Symbol, Expr)>,
}Expand description
One organ a profile uses, with its configuration options.
Fields§
§organ: SymbolSymbol of the organ being used.
options: Vec<(Symbol, Expr)>Key/value options configuring the organ.
Implementations§
Source§impl OrganUse
impl OrganUse
Sourcepub fn with_option(self, key: Symbol, value: Expr) -> Self
pub fn with_option(self, key: Symbol, value: Expr) -> Self
Add an option key/value pair.
Sourcepub fn to_expr(&self) -> Expr
pub fn to_expr(&self) -> Expr
Encode this organ use as an expression (organ symbol plus option map).
Sourcepub fn from_expr(expr: &Expr) -> Result<Self>
pub fn from_expr(expr: &Expr) -> Result<Self>
Decode an organ use from its OrganUse::to_expr encoding.
Trait Implementations§
impl Eq for OrganUse
impl StructuralPartialEq for OrganUse
Auto Trait Implementations§
impl Freeze for OrganUse
impl RefUnwindSafe for OrganUse
impl Send for OrganUse
impl Sync for OrganUse
impl Unpin for OrganUse
impl UnsafeUnpin for OrganUse
impl UnwindSafe for OrganUse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.