pub struct DefaultBrick;Expand description
Default Brick implementation for simple widgets.
Use this when you need a minimal Brick implementation that always passes verification.
Trait Implementations§
Source§impl Brick for DefaultBrick
impl Brick for DefaultBrick
Source§fn brick_name(&self) -> &'static str
fn brick_name(&self) -> &'static str
Get the brick’s unique type name
Source§fn assertions(&self) -> &[BrickAssertion]
fn assertions(&self) -> &[BrickAssertion]
Get all assertions for this brick
Source§fn budget(&self) -> BrickBudget
fn budget(&self) -> BrickBudget
Get the performance budget
Source§fn verify(&self) -> BrickVerification
fn verify(&self) -> BrickVerification
Verify all assertions against current state Read more
Source§fn can_render(&self) -> bool
fn can_render(&self) -> bool
Check if this brick can be rendered (all assertions pass)
Source§impl Clone for DefaultBrick
impl Clone for DefaultBrick
Source§fn clone(&self) -> DefaultBrick
fn clone(&self) -> DefaultBrick
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 DefaultBrick
impl Debug for DefaultBrick
impl Copy for DefaultBrick
Auto Trait Implementations§
impl Freeze for DefaultBrick
impl RefUnwindSafe for DefaultBrick
impl Send for DefaultBrick
impl Sync for DefaultBrick
impl Unpin for DefaultBrick
impl UnwindSafe for DefaultBrick
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
Source§impl<T> BrickWidgetExt for Twhere
T: Brick,
impl<T> BrickWidgetExt for Twhere
T: Brick,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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