pub struct MotionConstraintSet { /* private fields */ }Expand description
An editable snapshot of the direct children in a MotionLayout endpoint.
Implementations§
Source§impl MotionConstraintSet
impl MotionConstraintSet
pub fn child_mut(&mut self, id: &str) -> Option<&mut Node>
Sourcepub fn motion_easing(&self, id: &str) -> Option<MotionEasing>
pub fn motion_easing(&self, id: &str) -> Option<MotionEasing>
Return a child’s authored or runtime starting path easing, if present.
Sourcepub fn motion_stagger(&self, id: &str) -> Option<f32>
pub fn motion_stagger(&self, id: &str) -> Option<f32>
Return a child’s explicit stagger weight, if present.
Sourcepub fn motion_quantization(&self, id: &str) -> Option<MotionQuantizer>
pub fn motion_quantization(&self, id: &str) -> Option<MotionQuantizer>
Return a child’s motion quantizer, if present.
Sourcepub fn motion_path_arc(&self, id: &str) -> Option<MotionPathArc>
pub fn motion_path_arc(&self, id: &str) -> Option<MotionPathArc>
Return a child’s explicit path arc, if present.
Sourcepub fn motion_relative_to(&self, id: &str) -> Option<&'static str>
pub fn motion_relative_to(&self, id: &str) -> Option<&'static str>
Return a child’s relative-motion anchor, if present.
Sourcepub fn set_motion_easing(
&mut self,
id: &str,
easing: Option<MotionEasing>,
) -> bool
pub fn set_motion_easing( &mut self, id: &str, easing: Option<MotionEasing>, ) -> bool
Set or clear the easing applied to a direct child’s motion path.
Sourcepub fn set_motion_stagger(&mut self, id: &str, weight: Option<f32>) -> bool
pub fn set_motion_stagger(&mut self, id: &str, weight: Option<f32>) -> bool
Set or clear a direct child’s explicit motion stagger weight.
Sourcepub fn set_motion_quantization(
&mut self,
id: &str,
steps: Option<u32>,
phase: f32,
easing: Option<MotionEasing>,
) -> bool
pub fn set_motion_quantization( &mut self, id: &str, steps: Option<u32>, phase: f32, easing: Option<MotionEasing>, ) -> bool
Set or clear progress quantization for a direct child.
Sourcepub fn set_motion_path_arc(
&mut self,
id: &str,
arc: Option<MotionPathArc>,
) -> bool
pub fn set_motion_path_arc( &mut self, id: &str, arc: Option<MotionPathArc>, ) -> bool
Set or clear a direct child’s path arc override.
Sourcepub fn set_motion_relative_to(&mut self, id: &str, anchor: Option<&str>) -> bool
pub fn set_motion_relative_to(&mut self, id: &str, anchor: Option<&str>) -> bool
Set or clear a direct child’s relative-motion anchor.
Sourcepub fn set_visibility(&mut self, id: &str, visibility: Visibility) -> bool
pub fn set_visibility(&mut self, id: &str, visibility: Visibility) -> bool
Set a direct child’s endpoint visibility in this snapshot.
Sourcepub fn visibility_mode_ignored(&self, id: &str) -> Option<bool>
pub fn visibility_mode_ignored(&self, id: &str) -> Option<bool>
Return whether this snapshot ignores endpoint visibility changes.
Sourcepub fn set_visibility_mode_ignored(&mut self, id: &str, ignored: bool) -> bool
pub fn set_visibility_mode_ignored(&mut self, id: &str, ignored: bool) -> bool
Set whether a direct child’s endpoint visibility changes are ignored.
Sourcepub fn set_constraint_tag(&mut self, id: &str, tag: Option<&str>) -> bool
pub fn set_constraint_tag(&mut self, id: &str, tag: Option<&str>) -> bool
Set or clear a child’s constraint tag in this snapshot.
pub fn constraint_tag(&self, id: &str) -> Option<&str>
Sourcepub fn set_pivot_target(&mut self, id: &str, target: Option<&str>) -> bool
pub fn set_pivot_target(&mut self, id: &str, target: Option<&str>) -> bool
Set or clear a direct child’s pivot target in this snapshot.
pub fn pivot_target(&self, id: &str) -> Option<&'static str>
Sourcepub fn set_constraint_bias(
&mut self,
id: &str,
horizontal: bool,
value: Option<f32>,
) -> bool
pub fn set_constraint_bias( &mut self, id: &str, horizontal: bool, value: Option<f32>, ) -> bool
Set or clear a direct child’s horizontal or vertical constraint bias.
Sourcepub fn set_constraint_percent(
&mut self,
id: &str,
horizontal: bool,
value: Option<f32>,
) -> bool
pub fn set_constraint_percent( &mut self, id: &str, horizontal: bool, value: Option<f32>, ) -> bool
Set or clear a match-constraint percentage for one axis.
Sourcepub fn set_constraint_ratio(&mut self, id: &str, value: Option<&str>) -> bool
pub fn set_constraint_ratio(&mut self, id: &str, value: Option<&str>) -> bool
Set or clear a direct child’s dimension ratio override.
Sourcepub fn set_constraint_size_bound(
&mut self,
id: &str,
bound: MotionSizeBound,
value: Option<MotionSizeValue>,
) -> bool
pub fn set_constraint_size_bound( &mut self, id: &str, bound: MotionSizeBound, value: Option<MotionSizeValue>, ) -> bool
Override a match-constraint limit. Zero clears the underlying limit; None removes the override.
Sourcepub fn set_constraint_anchor(
&mut self,
id: &str,
rule: u16,
target: Option<&str>,
) -> bool
pub fn set_constraint_anchor( &mut self, id: &str, rule: u16, target: Option<&str>, ) -> bool
Replace or disconnect one logical constraint anchor on a direct child.
Clear the override with set_constraint_size_bound(id, MotionSizeBound::Anchor(rule), None).
Sourcepub fn set_constraint_physical_anchor(
&mut self,
id: &str,
rule: u16,
target: Option<&str>,
) -> bool
pub fn set_constraint_physical_anchor( &mut self, id: &str, rule: u16, target: Option<&str>, ) -> bool
Replace or disconnect a physical left/right constraint anchor. Rules use the corresponding start/end constants; the physical side does not mirror in RTL.
Sourcepub fn set_constraint_circle(
&mut self,
id: &str,
target: &str,
radius: MotionNativeValue,
angle: f32,
) -> bool
pub fn set_constraint_circle( &mut self, id: &str, target: &str, radius: MotionNativeValue, angle: f32, ) -> bool
Constrain a direct child to a circle around the parent or another direct child.
Sourcepub fn clear_constraint_circle(&mut self, id: &str) -> bool
pub fn clear_constraint_circle(&mut self, id: &str) -> bool
Clear a child’s circular constraint, exposing its ordinary edge constraints.
Sourcepub fn set_custom_value(
&mut self,
id: &str,
name: &'static str,
value: Option<MotionCustomValue>,
) -> bool
pub fn set_custom_value( &mut self, id: &str, name: &'static str, value: Option<MotionCustomValue>, ) -> bool
Set or remove an endpoint custom attribute or method value.
pub fn custom_value(&self, id: &str, name: &str) -> Option<MotionCustomValue>
Sourcepub fn set_view_property(
&mut self,
id: &str,
property: MotionProperty,
value: f32,
) -> bool
pub fn set_view_property( &mut self, id: &str, property: MotionProperty, value: f32, ) -> bool
Set alpha or a supported planar transform or depth property on a direct child.
Sourcepub fn set_view_property_value(
&mut self,
id: &str,
property: MotionProperty,
value: MotionNativeValue,
) -> bool
pub fn set_view_property_value( &mut self, id: &str, property: MotionProperty, value: MotionNativeValue, ) -> bool
Set a planar property while preserving a dimension’s authored unit.