pub trait Constraints {
// Required methods
fn is_tight(&self) -> bool;
fn is_normalized(&self) -> bool;
// Provided method
fn debug_assert_is_valid(&self, is_applied_constraint: bool) -> bool { ... }
}Expand description
Immutable layout constraints.
Flutter’s counterpart is the abstract Constraints class.
Required Methods§
Sourcefn is_normalized(&self) -> bool
fn is_normalized(&self) -> bool
Whether the constraint is expressed in a consistent manner.
Provided Methods§
Sourcefn debug_assert_is_valid(&self, is_applied_constraint: bool) -> bool
fn debug_assert_is_valid(&self, is_applied_constraint: bool) -> bool
Asserts that the constraints are valid.
Returns the same as is_normalized if asserts
are disabled.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".