pub struct FactorSideOffsets {
pub top: Factor,
pub right: Factor,
pub bottom: Factor,
pub left: Factor,
}Expand description
Scale factor applied to margins.
Fields§
§top: FactorFactor of top offset.
right: FactorFactor of right offset.
bottom: FactorFactor of bottom offset.
left: FactorFactor of left offset.
Implementations§
Source§impl FactorSideOffsets
impl FactorSideOffsets
Sourcepub fn new(
top: impl Into<Factor>,
right: impl Into<Factor>,
bottom: impl Into<Factor>,
left: impl Into<Factor>,
) -> FactorSideOffsets
pub fn new( top: impl Into<Factor>, right: impl Into<Factor>, bottom: impl Into<Factor>, left: impl Into<Factor>, ) -> FactorSideOffsets
Factors applied to each offset.
Sourcepub fn new_vh(
top_bottom: impl Into<Factor>,
left_right: impl Into<Factor>,
) -> FactorSideOffsets
pub fn new_vh( top_bottom: impl Into<Factor>, left_right: impl Into<Factor>, ) -> FactorSideOffsets
Same scale applied to parallel offsets.
Sourcepub fn new_all(uniform: impl Into<Factor>) -> FactorSideOffsets
pub fn new_all(uniform: impl Into<Factor>) -> FactorSideOffsets
Uniform scale applied to all offsets.
Sourcepub fn zero() -> FactorSideOffsets
pub fn zero() -> FactorSideOffsets
Uniform 0%.
Sourcepub fn one() -> FactorSideOffsets
pub fn one() -> FactorSideOffsets
Uniform 100%.
Trait Implementations§
Source§impl Clone for FactorSideOffsets
impl Clone for FactorSideOffsets
Source§fn clone(&self) -> FactorSideOffsets
fn clone(&self) -> FactorSideOffsets
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 FactorSideOffsets
impl Debug for FactorSideOffsets
Source§impl Div<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
impl Div<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
Source§fn div(self, rhs: FactorSideOffsets) -> SideOffsets2D<Dip, Dip>
fn div(self, rhs: FactorSideOffsets) -> SideOffsets2D<Dip, Dip>
Performs the
/ operation. Read moreSource§impl Div<FactorSideOffsets> for SideOffsets2D<Px, Px>
impl Div<FactorSideOffsets> for SideOffsets2D<Px, Px>
Source§fn div(self, rhs: FactorSideOffsets) -> SideOffsets2D<Px, Px>
fn div(self, rhs: FactorSideOffsets) -> SideOffsets2D<Px, Px>
Performs the
/ operation. Read moreSource§impl Div for FactorSideOffsets
impl Div for FactorSideOffsets
Source§type Output = FactorSideOffsets
type Output = FactorSideOffsets
The resulting type after applying the
/ operator.Source§fn div(self, rhs: FactorSideOffsets) -> FactorSideOffsets
fn div(self, rhs: FactorSideOffsets) -> FactorSideOffsets
Performs the
/ operation. Read moreSource§impl DivAssign<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
impl DivAssign<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
Source§fn div_assign(&mut self, rhs: FactorSideOffsets)
fn div_assign(&mut self, rhs: FactorSideOffsets)
Performs the
/= operation. Read moreSource§impl DivAssign<FactorSideOffsets> for SideOffsets2D<Px, Px>
impl DivAssign<FactorSideOffsets> for SideOffsets2D<Px, Px>
Source§fn div_assign(&mut self, rhs: FactorSideOffsets)
fn div_assign(&mut self, rhs: FactorSideOffsets)
Performs the
/= operation. Read moreSource§impl DivAssign for FactorSideOffsets
impl DivAssign for FactorSideOffsets
Source§fn div_assign(&mut self, rhs: FactorSideOffsets)
fn div_assign(&mut self, rhs: FactorSideOffsets)
Performs the
/= operation. Read moreSource§impl<T, R, B, L> From<(T, R, B, L)> for FactorSideOffsets
impl<T, R, B, L> From<(T, R, B, L)> for FactorSideOffsets
Source§fn from(_: (T, R, B, L)) -> FactorSideOffsets
fn from(_: (T, R, B, L)) -> FactorSideOffsets
New top, right, bottom, left.
Source§impl<TB, LR> From<(TB, LR)> for FactorSideOffsets
impl<TB, LR> From<(TB, LR)> for FactorSideOffsets
Source§fn from(_: (TB, LR)) -> FactorSideOffsets
fn from(_: (TB, LR)) -> FactorSideOffsets
New dimension, top-bottom, left-right.
Source§impl From<Factor> for FactorSideOffsets
impl From<Factor> for FactorSideOffsets
Source§fn from(all: Factor) -> FactorSideOffsets
fn from(all: Factor) -> FactorSideOffsets
All sides equal.
Source§impl From<FactorPercent> for FactorSideOffsets
impl From<FactorPercent> for FactorSideOffsets
Source§fn from(percent: FactorPercent) -> FactorSideOffsets
fn from(percent: FactorPercent) -> FactorSideOffsets
All sides equal.
Source§impl Hash for FactorSideOffsets
impl Hash for FactorSideOffsets
Source§impl<T, R, B, L> IntoVar<FactorSideOffsets> for (T, R, B, L)
impl<T, R, B, L> IntoVar<FactorSideOffsets> for (T, R, B, L)
Source§fn into_var(self) -> Var<FactorSideOffsets>
fn into_var(self) -> Var<FactorSideOffsets>
New top, right, bottom, left.
Source§impl<TB, LR> IntoVar<FactorSideOffsets> for (TB, LR)
impl<TB, LR> IntoVar<FactorSideOffsets> for (TB, LR)
Source§fn into_var(self) -> Var<FactorSideOffsets>
fn into_var(self) -> Var<FactorSideOffsets>
New dimension, top-bottom, left-right.
Source§impl IntoVar<FactorSideOffsets> for Factor
impl IntoVar<FactorSideOffsets> for Factor
Source§fn into_var(self) -> Var<FactorSideOffsets>
fn into_var(self) -> Var<FactorSideOffsets>
All sides equal.
Source§impl IntoVar<FactorSideOffsets> for FactorPercent
impl IntoVar<FactorSideOffsets> for FactorPercent
Source§fn into_var(self) -> Var<FactorSideOffsets>
fn into_var(self) -> Var<FactorSideOffsets>
All sides equal.
Source§impl Mul<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
impl Mul<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
Source§fn mul(self, rhs: FactorSideOffsets) -> SideOffsets2D<Dip, Dip>
fn mul(self, rhs: FactorSideOffsets) -> SideOffsets2D<Dip, Dip>
Performs the
* operation. Read moreSource§impl Mul<FactorSideOffsets> for SideOffsets2D<Px, Px>
impl Mul<FactorSideOffsets> for SideOffsets2D<Px, Px>
Source§fn mul(self, rhs: FactorSideOffsets) -> SideOffsets2D<Px, Px>
fn mul(self, rhs: FactorSideOffsets) -> SideOffsets2D<Px, Px>
Performs the
* operation. Read moreSource§impl Mul for FactorSideOffsets
impl Mul for FactorSideOffsets
Source§type Output = FactorSideOffsets
type Output = FactorSideOffsets
The resulting type after applying the
* operator.Source§fn mul(self, rhs: FactorSideOffsets) -> FactorSideOffsets
fn mul(self, rhs: FactorSideOffsets) -> FactorSideOffsets
Performs the
* operation. Read moreSource§impl MulAssign<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
impl MulAssign<FactorSideOffsets> for SideOffsets2D<Dip, Dip>
Source§fn mul_assign(&mut self, rhs: FactorSideOffsets)
fn mul_assign(&mut self, rhs: FactorSideOffsets)
Performs the
*= operation. Read moreSource§impl MulAssign<FactorSideOffsets> for SideOffsets2D<Px, Px>
impl MulAssign<FactorSideOffsets> for SideOffsets2D<Px, Px>
Source§fn mul_assign(&mut self, rhs: FactorSideOffsets)
fn mul_assign(&mut self, rhs: FactorSideOffsets)
Performs the
*= operation. Read moreSource§impl MulAssign for FactorSideOffsets
impl MulAssign for FactorSideOffsets
Source§fn mul_assign(&mut self, rhs: FactorSideOffsets)
fn mul_assign(&mut self, rhs: FactorSideOffsets)
Performs the
*= operation. Read moreSource§impl PartialEq for FactorSideOffsets
impl PartialEq for FactorSideOffsets
impl Copy for FactorSideOffsets
impl Eq for FactorSideOffsets
impl<T, R, B, L> IntoValue<FactorSideOffsets> for (T, R, B, L)
impl<TB, LR> IntoValue<FactorSideOffsets> for (TB, LR)
impl IntoValue<FactorSideOffsets> for Factor
impl IntoValue<FactorSideOffsets> for FactorPercent
impl StructuralPartialEq for FactorSideOffsets
Auto Trait Implementations§
impl Freeze for FactorSideOffsets
impl RefUnwindSafe for FactorSideOffsets
impl Send for FactorSideOffsets
impl Sync for FactorSideOffsets
impl Unpin for FactorSideOffsets
impl UnwindSafe for FactorSideOffsets
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Clone the value.
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
Swap value with
other if both are of the same type.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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more