pub struct Frame(/* private fields */);Expand description
A sampled frame with Kit-native element builders and portable status getters.
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn at(target: Target) -> Self
pub fn at(target: Target) -> Self
Creates a static Kit-ready frame, for custom mappings and portable sampling.
Sourcepub fn apply<E: Styled>(self, element: E) -> E
pub fn apply<E: Styled>(self, element: E) -> E
Applies opacity, relative position, and declared dimensions/radius. Dimensions perform real layout. This sets relative position, left, and top; use an outer reservation when absolute placement is required.
Sourcepub fn render<E: IntoElement>(self, build: impl FnOnce(Self) -> E) -> AnyElement
pub fn render<E: IntoElement>(self, build: impl FnOnce(Self) -> E) -> AnyElement
Keeps exiting elements rendered until absent. The owner must guard input and restore focus before removing a focused outgoing element.
Methods from Deref<Target = Frame>§
Sourcepub fn just_completed(self) -> bool
pub fn just_completed(self) -> bool
Completion edge. Read once per view render to dispatch an owner-level event.
Sourcepub fn target(self) -> Target
pub fn target(self) -> Target
Current presentation values, rather than the declaration’s destination.
Sourcepub fn velocity(self) -> [f64; 3]
pub fn velocity(self) -> [f64; 3]
Current x, y, and opacity velocities per second, before drawing clamps.
Sourcepub fn layout_velocity(self) -> [Option<f64>; 3]
pub fn layout_velocity(self) -> [Option<f64>; 3]
Width, height, and radius velocities in logical pixels per second.
Undeclared channels return None; velocities are before drawing clamps.
Sourcepub fn is_animating(self) -> bool
pub fn is_animating(self) -> bool
Whether another animation frame is needed.
Sourcepub fn is_mounted(self) -> bool
pub fn is_mounted(self) -> bool
Whether the element must remain in the rendered tree, including its exit.
Sourcepub fn is_present(self) -> bool
pub fn is_present(self) -> bool
Whether the model requests presence. Disable exit-time input using this.
Trait Implementations§
impl Copy for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
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> ⓘ
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