Struct ambient_api::prelude::MeasureSize
source · pub struct MeasureSize {
pub inner: Element,
pub on_change: Arc<CbDebuggable<dyn Fn(Vec2) + Sync + Send>>,
}
Expand description
Measures the size of its inner element and calls the callback when it changes.
Fields§
§inner: Element
The element to measure.
on_change: Arc<CbDebuggable<dyn Fn(Vec2) + Sync + Send>>
The callback to call when the size changes.
Implementations§
Trait Implementations§
source§impl Clone for MeasureSize
impl Clone for MeasureSize
source§fn clone(&self) -> MeasureSize
fn clone(&self) -> MeasureSize
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 MeasureSize
impl Debug for MeasureSize
source§impl ElementComponent for MeasureSize
impl ElementComponent for MeasureSize
Auto Trait Implementations§
impl !RefUnwindSafe for MeasureSize
impl Send for MeasureSize
impl Sync for MeasureSize
impl Unpin for MeasureSize
impl !UnwindSafe for MeasureSize
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> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.