Struct kas::layout::SingleSolver
source · pub struct SingleSolver { /* private fields */ }
Expand description
RulesSolver
implementation for a fixed single-child layout
Implementations§
source§impl SingleSolver
impl SingleSolver
sourcepub fn new(axis: AxisInfo, _dim: (), _storage: &mut ()) -> SingleSolver
pub fn new(axis: AxisInfo, _dim: (), _storage: &mut ()) -> SingleSolver
Construct.
Argument order is consistent with other RulesSolver
s.
axis
:AxisInfo
instance passed intosize_rules
_dim
: unused_storage
: unused
Trait Implementations§
source§impl RulesSolver for SingleSolver
impl RulesSolver for SingleSolver
§type ChildInfo = ()
type ChildInfo = ()
Type required by
RulesSolver::for_child
(see implementation documentation)source§fn for_child<CR>(
&mut self,
_storage: &mut <SingleSolver as RulesSolver>::Storage,
_child_info: <SingleSolver as RulesSolver>::ChildInfo,
child_rules: CR
)
fn for_child<CR>( &mut self, _storage: &mut <SingleSolver as RulesSolver>::Storage, _child_info: <SingleSolver as RulesSolver>::ChildInfo, child_rules: CR )
Called once for each child. For most layouts the order is important.
source§fn finish(
self,
_storage: &mut <SingleSolver as RulesSolver>::Storage
) -> SizeRules
fn finish( self, _storage: &mut <SingleSolver as RulesSolver>::Storage ) -> SizeRules
Auto Trait Implementations§
impl RefUnwindSafe for SingleSolver
impl Send for SingleSolver
impl Sync for SingleSolver
impl Unpin for SingleSolver
impl UnwindSafe for SingleSolver
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
§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
§fn cast_approx(self) -> T
fn cast_approx(self) -> T
§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
§fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
§fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
§fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
§fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more
§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.