pub struct MergeLayersUse { /* private fields */ }Expand description
The value is one layer of an ordered Sprig merge: a key of an earlier
layer shadows the same key of every later layer at the rendered sink, so
a later layer’s member reaches the sink only where every earlier layer
lacks that member.
Implementations§
Source§impl MergeLayersUse
impl MergeLayersUse
Sourcepub fn new(
layers: Vec<MergeLayer>,
position: usize,
via_binding: bool,
) -> Option<Self>
pub fn new( layers: Vec<MergeLayer>, position: usize, via_binding: bool, ) -> Option<Self>
Creates a layered use when position selects an entry in layers.
Sourcepub fn layers(&self) -> &[MergeLayer]
pub fn layers(&self) -> &[MergeLayer]
Returns every layer in precedence order.
Sourcepub fn position(&self) -> usize
pub fn position(&self) -> usize
Returns this use’s checked index in Self::layers.
Sourcepub fn own_path_is(&self, path: &ValuesPath) -> bool
pub fn own_path_is(&self, path: &ValuesPath) -> bool
Reports whether the own layer has path.
Sourcepub fn shadowed_by(&self) -> impl ExactSizeIterator<Item = &MergeLayer>
pub fn shadowed_by(&self) -> impl ExactSizeIterator<Item = &MergeLayer>
Returns the higher-precedence layers whose keys shadow this layer’s.
Sourcepub fn own_transform(&self) -> MergeLayerTransform
pub fn own_transform(&self) -> MergeLayerTransform
Returns the transform applied to this use’s layer.
Sourcepub fn has_transformed_layer(&self) -> bool
pub fn has_transformed_layer(&self) -> bool
Reports whether any layer is structurally transformed.
Sourcepub fn via_binding(&self) -> bool
pub fn via_binding(&self) -> bool
Reports whether these facts crossed a local binding boundary.
Sourcepub fn into_via_binding(self) -> Self
pub fn into_via_binding(self) -> Self
Marks these layer facts as crossing a local binding boundary.
Trait Implementations§
Source§impl Clone for MergeLayersUse
impl Clone for MergeLayersUse
Source§fn clone(&self) -> MergeLayersUse
fn clone(&self) -> MergeLayersUse
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 MergeLayersUse
impl Debug for MergeLayersUse
Source§impl<'de> Deserialize<'de> for MergeLayersUse
impl<'de> Deserialize<'de> for MergeLayersUse
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MergeLayersUse
Source§impl Hash for MergeLayersUse
impl Hash for MergeLayersUse
Source§impl Ord for MergeLayersUse
impl Ord for MergeLayersUse
Source§fn cmp(&self, other: &MergeLayersUse) -> Ordering
fn cmp(&self, other: &MergeLayersUse) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MergeLayersUse
impl PartialEq for MergeLayersUse
Source§impl PartialOrd for MergeLayersUse
impl PartialOrd for MergeLayersUse
Source§impl Serialize for MergeLayersUse
impl Serialize for MergeLayersUse
impl StructuralPartialEq for MergeLayersUse
Auto Trait Implementations§
impl Freeze for MergeLayersUse
impl RefUnwindSafe for MergeLayersUse
impl Send for MergeLayersUse
impl Sync for MergeLayersUse
impl Unpin for MergeLayersUse
impl UnsafeUnpin for MergeLayersUse
impl UnwindSafe for MergeLayersUse
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