pub struct FactorSideOffsets {
pub top: Factor,
pub right: Factor,
pub bottom: Factor,
pub left: Factor,
}
Expand description
Scale factor applied to margins.
Fields§
§top: Factor
Factor of top offset.
right: Factor
Factor of right offset.
bottom: Factor
Factor of bottom offset.
left: Factor
Factor 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 copy 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<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) -> <(T, R, B, L) as IntoVar<FactorSideOffsets>>::Var
fn into_var(self) -> <(T, R, B, L) as IntoVar<FactorSideOffsets>>::Var
New top, right, bottom, left.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl<TB, LR> IntoVar<FactorSideOffsets> for (TB, LR)
impl<TB, LR> IntoVar<FactorSideOffsets> for (TB, LR)
source§fn into_var(self) -> <(TB, LR) as IntoVar<FactorSideOffsets>>::Var
fn into_var(self) -> <(TB, LR) as IntoVar<FactorSideOffsets>>::Var
New dimension, top-bottom, left-right.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<FactorSideOffsets> for Factor
impl IntoVar<FactorSideOffsets> for Factor
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<FactorSideOffsets> for FactorPercent
impl IntoVar<FactorSideOffsets> for FactorPercent
source§fn into_var(self) -> <FactorPercent as IntoVar<FactorSideOffsets>>::Var
fn into_var(self) -> <FactorPercent as IntoVar<FactorSideOffsets>>::Var
All sides equal.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§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<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 Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self
equals other
.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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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
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