pub struct OffsetOptionsValues {
pub main_axis: Option<f64>,
pub cross_axis: Option<f64>,
pub alignment_axis: Option<f64>,
}
Expand description
Axes configuration for OffsetOptions
.
Fields§
§main_axis: Option<f64>
The axis that runs along the side of the floating element. Represents the distance (gutter or margin) between the reference and floating element.
Defaults to 0
.
cross_axis: Option<f64>
The axis that runs along the alignment of the floating element. Represents the skidding between the reference and floating element.
Defaults to 0
.
alignment_axis: Option<f64>
The same axis as cross_axis
but applies only to aligned placements and inverts the End
alignment.
When set to a number, it overrides the cross_axis
value.
A positive number will move the floating element in the direction of the opposite edge to the one that is aligned, while a negative number the reverse.
Defaults to Option::None
.
Implementations§
Source§impl OffsetOptionsValues
impl OffsetOptionsValues
Sourcepub fn cross_axis(self, value: f64) -> Self
pub fn cross_axis(self, value: f64) -> Self
Set cross_axis
option.
Sourcepub fn alignment_axis(self, value: f64) -> Self
pub fn alignment_axis(self, value: f64) -> Self
Set alignment_axis
option.
Trait Implementations§
Source§impl Clone for OffsetOptionsValues
impl Clone for OffsetOptionsValues
Source§fn clone(&self) -> OffsetOptionsValues
fn clone(&self) -> OffsetOptionsValues
Returns a duplicate of the value. Read more
1.0.0 · 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 OffsetOptionsValues
impl Debug for OffsetOptionsValues
Source§impl Default for OffsetOptionsValues
impl Default for OffsetOptionsValues
Source§fn default() -> OffsetOptionsValues
fn default() -> OffsetOptionsValues
Returns the “default value” for a type. Read more
Source§impl PartialEq for OffsetOptionsValues
impl PartialEq for OffsetOptionsValues
impl StructuralPartialEq for OffsetOptionsValues
Auto Trait Implementations§
impl Freeze for OffsetOptionsValues
impl RefUnwindSafe for OffsetOptionsValues
impl Send for OffsetOptionsValues
impl Sync for OffsetOptionsValues
impl Unpin for OffsetOptionsValues
impl UnwindSafe for OffsetOptionsValues
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