Struct ShownFrames
pub struct ShownFrames<S> { /* private fields */ }Expand description
The frame being drawn and the frame on screen, as noted.
Implementations§
§impl<S> ShownFrames<S>
impl<S> ShownFrames<S>
pub fn note(&self, shown: S)
pub fn note(&self, shown: S)
From the scroller’s draw: what this frame shows.
pub fn present(&mut self)
pub fn present(&mut self)
From the scroller’s mark_drawn: the frame just drawn is on screen.
Not drawn this frame, what the screen shows where the scroller lies
is not known to be its content, and its next frame repaints.
pub fn frames(&self) -> Option<(Ref<'_, S>, &S)>
pub fn frames(&self) -> Option<(Ref<'_, S>, &S)>
The frame being drawn and the frame on screen, when both are noted.
pub fn drawing_mut(&self) -> Option<RefMut<'_, S>>
pub fn drawing_mut(&self) -> Option<RefMut<'_, S>>
The frame being drawn, to add what its draw learns late (the thumbs its bars painted).
pub fn forget(&mut self)
pub fn forget(&mut self)
Forget both frames: an outer cache owns the draw now, and the next frame the scroller draws repaints.
§impl<S> ShownFrames<S>
impl<S> ShownFrames<S>
pub fn compare<T>(&self, owner: &T, regions: &mut Vec<Rect>) -> Sincewhere
T: ?Sized,
pub fn compare<T>(&self, owner: &T, regions: &mut Vec<Rect>) -> Sincewhere
T: ?Sized,
From the scroller’s collect_damage: how this frame differs from
the one on screen, offering a scroll to a host that copies on
behalf of owner (the widget in the tree the scroller draws in).
What stays put over the content and changed (or that a copy moves)
is added to regions.
§impl ShownFrames<Showing<Around, Painted>>
impl ShownFrames<Showing<Around, Painted>>
pub fn damage_within<T>(&self, owner: &T, bounds: Rect, regions: &mut Vec<Rect>)where
T: ?Sized,
pub fn damage_within<T>(&self, owner: &T, bounds: Rect, regions: &mut Vec<Rect>)where
T: ?Sized,
Self::damage, and on a frame that repaints, the whole box the
scroller paints now, bounds, and where it painted before.
§impl<L, P> ShownFrames<Showing<L, P>>
impl<L, P> ShownFrames<Showing<L, P>>
Trait Implementations§
§impl<S> Debug for ShownFrames<S>where
S: Debug,
impl<S> Debug for ShownFrames<S>where
S: Debug,
§impl<S> Default for ShownFrames<S>
impl<S> Default for ShownFrames<S>
§fn default() -> ShownFrames<S>
fn default() -> ShownFrames<S>
Auto Trait Implementations§
impl<S> !Freeze for ShownFrames<S>
impl<S> !RefUnwindSafe for ShownFrames<S>
impl<S> Send for ShownFrames<S>where
S: Send,
impl<S> !Sync for ShownFrames<S>
impl<S> Unpin for ShownFrames<S>where
S: Unpin,
impl<S> UnsafeUnpin for ShownFrames<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ShownFrames<S>where
S: UnwindSafe,
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<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> DowncastSend for T
impl<T> DowncastSend for T
§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