pub enum LayerComposition {
Single {
name: String,
},
Homogeneous {
layer_name: String,
count: usize,
},
Pair {
head: Box<LayerComposition>,
tail: Box<LayerComposition>,
},
}Expand description
Static description of a layer stack for cache keys and recipes.
Variants§
Single
Single named stage.
Homogeneous
count identical layers (homogeneous array).
Pair
Heterogeneous head + tail (pair).
Implementations§
Source§impl LayerComposition
impl LayerComposition
pub fn single(name: impl Into<String>) -> Self
pub fn homogeneous(layer_name: impl Into<String>, count: usize) -> Self
pub fn pair(head: LayerComposition, tail: LayerComposition) -> Self
Sourcepub fn cache_key(&self) -> u64
pub fn cache_key(&self) -> u64
Fingerprint for rlx_ir::ModelComponent::layer_composition_key.
Sourcepub fn to_flow_stage(
&self,
build_layer: &dyn Fn(&str, usize) -> FlowStage,
) -> FlowStage
pub fn to_flow_stage( &self, build_layer: &dyn Fn(&str, usize) -> FlowStage, ) -> FlowStage
Expand into a FlowStage::Sequence by repeating build_layer.
pub fn depth_hint(&self) -> usize
Trait Implementations§
Source§impl Clone for LayerComposition
impl Clone for LayerComposition
Source§fn clone(&self) -> LayerComposition
fn clone(&self) -> LayerComposition
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 LayerComposition
impl Debug for LayerComposition
Source§impl PartialEq for LayerComposition
impl PartialEq for LayerComposition
Source§fn eq(&self, other: &LayerComposition) -> bool
fn eq(&self, other: &LayerComposition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for LayerComposition
impl StructuralPartialEq for LayerComposition
Auto Trait Implementations§
impl Freeze for LayerComposition
impl RefUnwindSafe for LayerComposition
impl Send for LayerComposition
impl Sync for LayerComposition
impl Unpin for LayerComposition
impl UnsafeUnpin for LayerComposition
impl UnwindSafe for LayerComposition
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.