Enum Appearance
pub enum Appearance {
Owned(Appearing),
Shared(Rc<Cell<Appearing>>),
}Expand description
One Appearing a surface and the host that draws it share.
A dialog belongs to the tree its app builds, and an app builds a new tree
whenever its state changes: a dialog built open would arrive again on
every rebuild, so it is built at rest instead — and then it never arrives
at all. A host that builds the app’s tree per state hands every rebuild
the same handle (Self::shared), so the surface arrives once, leaves
once, and reverses from where it is drawn like any other motion.
Variants§
Owned(Appearing)
The surface keeps its own: built open, it is drawn at rest from its first paint.
Kept by the host that rebuilds the surface’s tree.
Implementations§
§impl Appearance
impl Appearance
An appearance a host shares with every rebuild of a surface it draws, starting closed: the first paint of a surface built open arrives.
pub const fn is_owned(&self) -> bool
pub const fn is_owned(&self) -> bool
Whether the surface keeps this appearance itself: one built open is drawn at rest, since a rebuild would otherwise replay its arrival.
pub fn follow(&mut self, open: bool, motion: EffectiveMotion)
pub fn follow(&mut self, open: bool, motion: EffectiveMotion)
pub fn follow_from(
&mut self,
open: bool,
motion: EffectiveMotion,
source: MotionSource,
)
pub fn follow_from( &mut self, open: bool, motion: EffectiveMotion, source: MotionSource, )
pub fn show_from(&mut self, open: bool, source: MotionSource)
pub fn show_from(&mut self, open: bool, source: MotionSource)
Trait Implementations§
§impl Clone for Appearance
impl Clone for Appearance
§fn clone(&self) -> Appearance
fn clone(&self) -> Appearance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Appearance
impl Debug for Appearance
§impl Default for Appearance
impl Default for Appearance
§fn default() -> Appearance
fn default() -> Appearance
Auto Trait Implementations§
impl Freeze for Appearance
impl !RefUnwindSafe for Appearance
impl !Send for Appearance
impl !Sync for Appearance
impl Unpin for Appearance
impl UnsafeUnpin for Appearance
impl !UnwindSafe for Appearance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§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>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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