pub struct ChainPlacement {
pub site: SiteId,
pub profile: PlacementNodeProfile,
}Expand description
Placement of a chain device: where it runs and under what rate profile.
Fields§
§site: SiteIdSite the device is placed on.
profile: PlacementNodeProfileNode profile describing the device’s rate contract and pinning.
Implementations§
Source§impl ChainPlacement
impl ChainPlacement
Sourcepub fn new(site: impl Into<SiteId>, profile: PlacementNodeProfile) -> Self
pub fn new(site: impl Into<SiteId>, profile: PlacementNodeProfile) -> Self
Creates a placement for site with the given node profile.
Sourcepub fn local_coroutine() -> Self
pub fn local_coroutine() -> Self
Returns the default local-coroutine placement at MIDI-tick rate.
Sourcepub fn to_expr(&self) -> Expr
pub fn to_expr(&self) -> Expr
Encodes the placement, flattening its rate contract, as an expression map.
Sourcepub fn from_expr(expr: &Expr) -> Result<Self>
pub fn from_expr(expr: &Expr) -> Result<Self>
Decodes a placement from a map produced by ChainPlacement::to_expr.
Trait Implementations§
Source§impl Clone for ChainPlacement
impl Clone for ChainPlacement
Source§fn clone(&self) -> ChainPlacement
fn clone(&self) -> ChainPlacement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChainPlacement
impl Debug for ChainPlacement
impl Eq for ChainPlacement
Source§impl PartialEq for ChainPlacement
impl PartialEq for ChainPlacement
impl StructuralPartialEq for ChainPlacement
Auto Trait Implementations§
impl Freeze for ChainPlacement
impl RefUnwindSafe for ChainPlacement
impl Send for ChainPlacement
impl Sync for ChainPlacement
impl Unpin for ChainPlacement
impl UnsafeUnpin for ChainPlacement
impl UnwindSafe for ChainPlacement
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