Skip to main content

MotionConstraintSet

Struct MotionConstraintSet 

Source
pub struct MotionConstraintSet { /* private fields */ }
Expand description

An editable snapshot of the direct children in a MotionLayout endpoint.

Implementations§

Source§

impl MotionConstraintSet

Source

pub fn child_mut(&mut self, id: &str) -> Option<&mut Node>

Source

pub fn motion_easing(&self, id: &str) -> Option<MotionEasing>

Return a child’s authored or runtime starting path easing, if present.

Source

pub fn motion_stagger(&self, id: &str) -> Option<f32>

Return a child’s explicit stagger weight, if present.

Source

pub fn motion_quantization(&self, id: &str) -> Option<MotionQuantizer>

Return a child’s motion quantizer, if present.

Source

pub fn motion_path_arc(&self, id: &str) -> Option<MotionPathArc>

Return a child’s explicit path arc, if present.

Source

pub fn motion_relative_to(&self, id: &str) -> Option<&'static str>

Return a child’s relative-motion anchor, if present.

Source

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.

Source

pub fn set_motion_stagger(&mut self, id: &str, weight: Option<f32>) -> bool

Set or clear a direct child’s explicit motion stagger weight.

Source

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.

Source

pub fn set_motion_path_arc( &mut self, id: &str, arc: Option<MotionPathArc>, ) -> bool

Set or clear a direct child’s path arc override.

Source

pub fn set_motion_relative_to(&mut self, id: &str, anchor: Option<&str>) -> bool

Set or clear a direct child’s relative-motion anchor.

Source

pub fn set_visibility(&mut self, id: &str, visibility: Visibility) -> bool

Set a direct child’s endpoint visibility in this snapshot.

Source

pub fn visibility_mode_ignored(&self, id: &str) -> Option<bool>

Return whether this snapshot ignores endpoint visibility changes.

Source

pub fn set_visibility_mode_ignored(&mut self, id: &str, ignored: bool) -> bool

Set whether a direct child’s endpoint visibility changes are ignored.

Source

pub fn set_constraint_tag(&mut self, id: &str, tag: Option<&str>) -> bool

Set or clear a child’s constraint tag in this snapshot.

Source

pub fn constraint_tag(&self, id: &str) -> Option<&str>

Source

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.

Source

pub fn pivot_target(&self, id: &str) -> Option<&'static str>

Source

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.

Source

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.

Source

pub fn set_constraint_ratio(&mut self, id: &str, value: Option<&str>) -> bool

Set or clear a direct child’s dimension ratio override.

Source

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.

Source

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).

Source

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.

Source

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.

Source

pub fn clear_constraint_circle(&mut self, id: &str) -> bool

Clear a child’s circular constraint, exposing its ordinary edge constraints.

Source

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.

Source

pub fn custom_value(&self, id: &str, name: &str) -> Option<MotionCustomValue>

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for MotionConstraintSet

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Forget for MotionConstraintSet

§

impl Freeze for MotionConstraintSet
where *const u8 is !null: Freeze, PhantomData<Node>: Freeze, PhantomData<((&'static str, MotionSizeBound), ())>: Freeze, PhantomData<(&'static str, String)>: Freeze, PhantomData<((&'static str, &'static str), MotionCustomValue)>: Freeze, PhantomData<((&'static str, MotionProperty), MotionNativeValue)>: Freeze, PhantomData<((&'static str, bool), f32)>: Freeze, PhantomData<((&'static str, MotionSizeBound), MotionSizeValue)>: Freeze, PhantomData<(&'static str, &'static str)>: Freeze, PhantomData<(&'static str, bool)>: Freeze, &'static [(&'static str, MotionPathArc)]: Freeze, *const ArcInner<[(&'static str, MotionPathArc)]> is !null: Freeze, PhantomData<ArcInner<[(&'static str, MotionPathArc)]>>: Freeze, &'static [Option<f32>]: Freeze, *const ArcInner<[Option<f32>]> is !null: Freeze, PhantomData<ArcInner<[Option<f32>]>>: Freeze, &'static [MotionQuantizer]: Freeze, *const ArcInner<[MotionQuantizer]> is !null: Freeze, PhantomData<ArcInner<[MotionQuantizer]>>: Freeze, &'static [(&'static str, &'static str)]: Freeze, *const ArcInner<[(&'static str, &'static str)]> is !null: Freeze, PhantomData<ArcInner<[(&'static str, &'static str)]>>: Freeze, *const ArcInner<[MotionPositionTrack]> is !null: Freeze, PhantomData<ArcInner<[MotionPositionTrack]>>: Freeze,

§

impl Move for MotionConstraintSet

§

impl RefUnwindSafe for MotionConstraintSet

§

impl Send for MotionConstraintSet
where RawVecInner: Send, &'static str: Send, &'static [RelativeRule]: Send, &'static [TintState]: Send, &'static [Node]: Send, RawTable<((&'static str, MotionSizeBound), ())>: Send, RawTable<(&'static str, String)>: Send, RawTable<((&'static str, &'static str), MotionCustomValue)>: Send, RawTable<((&'static str, MotionProperty), MotionNativeValue)>: Send, RawTable<((&'static str, bool), f32)>: Send, RawTable<((&'static str, MotionSizeBound), MotionSizeValue)>: Send, RawTable<(&'static str, &'static str)>: Send, RawTable<(&'static str, bool)>: Send, &'static [(&'static str, MotionPathArc)]: Send, Arc<[(&'static str, MotionPathArc)]>: Send, &'static [Option<f32>]: Send, Arc<[Option<f32>]>: Send, &'static [MotionQuantizer]: Send, Arc<[MotionQuantizer]>: Send, &'static [(&'static str, &'static str)]: Send, Arc<[(&'static str, &'static str)]>: Send, Arc<[MotionPositionTrack]>: Send,

§

impl Sync for MotionConstraintSet
where RawVecInner: Sync, RawTable<((&'static str, MotionSizeBound), ())>: Sync, RawTable<(&'static str, String)>: Sync, RawTable<((&'static str, &'static str), MotionCustomValue)>: Sync, RawTable<((&'static str, MotionProperty), MotionNativeValue)>: Sync, RawTable<((&'static str, bool), f32)>: Sync, RawTable<((&'static str, MotionSizeBound), MotionSizeValue)>: Sync, RawTable<(&'static str, &'static str)>: Sync, RawTable<(&'static str, bool)>: Sync, Arc<[(&'static str, MotionPathArc)]>: Sync, Arc<[Option<f32>]>: Sync, Arc<[MotionQuantizer]>: Sync, Arc<[(&'static str, &'static str)]>: Sync, Arc<[MotionPositionTrack]>: Sync,

§

impl Unpin for MotionConstraintSet
where *const u8 is !null: Unpin, &'static str: Unpin, &'static [RelativeRule]: Unpin, &'static [TintState]: Unpin, &'static [Node]: Unpin, &'static [(&'static str, MotionPathArc)]: Unpin, Arc<[(&'static str, MotionPathArc)]>: Unpin, &'static [Option<f32>]: Unpin, Arc<[Option<f32>]>: Unpin, &'static [MotionQuantizer]: Unpin, Arc<[MotionQuantizer]>: Unpin, &'static [(&'static str, &'static str)]: Unpin, Arc<[(&'static str, &'static str)]>: Unpin, Arc<[MotionPositionTrack]>: Unpin,

§

impl UnsafeUnpin for MotionConstraintSet
where *const u8 is !null: UnsafeUnpin, PhantomData<Node>: UnsafeUnpin, PhantomData<((&'static str, MotionSizeBound), ())>: UnsafeUnpin, PhantomData<(&'static str, String)>: UnsafeUnpin, PhantomData<((&'static str, &'static str), MotionCustomValue)>: UnsafeUnpin, PhantomData<((&'static str, MotionProperty), MotionNativeValue)>: UnsafeUnpin, PhantomData<((&'static str, bool), f32)>: UnsafeUnpin, PhantomData<((&'static str, MotionSizeBound), MotionSizeValue)>: UnsafeUnpin, PhantomData<(&'static str, &'static str)>: UnsafeUnpin, PhantomData<(&'static str, bool)>: UnsafeUnpin, &'static [(&'static str, MotionPathArc)]: UnsafeUnpin, *const ArcInner<[(&'static str, MotionPathArc)]> is !null: UnsafeUnpin, PhantomData<ArcInner<[(&'static str, MotionPathArc)]>>: UnsafeUnpin, &'static [Option<f32>]: UnsafeUnpin, *const ArcInner<[Option<f32>]> is !null: UnsafeUnpin, PhantomData<ArcInner<[Option<f32>]>>: UnsafeUnpin, &'static [MotionQuantizer]: UnsafeUnpin, *const ArcInner<[MotionQuantizer]> is !null: UnsafeUnpin, PhantomData<ArcInner<[MotionQuantizer]>>: UnsafeUnpin, &'static [(&'static str, &'static str)]: UnsafeUnpin, *const ArcInner<[(&'static str, &'static str)]> is !null: UnsafeUnpin, PhantomData<ArcInner<[(&'static str, &'static str)]>>: UnsafeUnpin, *const ArcInner<[MotionPositionTrack]> is !null: UnsafeUnpin, PhantomData<ArcInner<[MotionPositionTrack]>>: UnsafeUnpin,

§

impl UnwindSafe for MotionConstraintSet
where RawVecInner: UnwindSafe, &'static str: UnwindSafe, &'static [RelativeRule]: UnwindSafe, &'static [TintState]: UnwindSafe, &'static [Node]: UnwindSafe, NonNull<u8>: UnwindSafe, HashMap<&'static str, String>: UnwindSafe, HashMap<(&'static str, &'static str), MotionCustomValue>: UnwindSafe, HashMap<(&'static str, MotionProperty), MotionNativeValue>: UnwindSafe, HashMap<(&'static str, bool), f32>: UnwindSafe, HashMap<(&'static str, MotionSizeBound), MotionSizeValue>: UnwindSafe, HashMap<&'static str, &'static str>: UnwindSafe, HashMap<&'static str, bool>: UnwindSafe, &'static [(&'static str, MotionPathArc)]: UnwindSafe, Arc<[(&'static str, MotionPathArc)]>: UnwindSafe, &'static [Option<f32>]: UnwindSafe, Arc<[Option<f32>]>: UnwindSafe, &'static [MotionQuantizer]: UnwindSafe, Arc<[MotionQuantizer]>: UnwindSafe, &'static [(&'static str, &'static str)]: UnwindSafe, Arc<[(&'static str, &'static str)]>: UnwindSafe, Arc<[MotionPositionTrack]>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.