pub struct DynBuffer { /* private fields */ }Expand description
Implementations§
Source§impl DynBuffer
impl DynBuffer
Sourcepub fn has_changed(&self, pa: &Pass) -> bool
pub fn has_changed(&self, pa: &Pass) -> bool
Wether the Buffer pointed to has changed or swapped with
another
Sourcepub fn swap_to_current(&mut self)
pub fn swap_to_current(&mut self)
Sourcepub fn handle(&self) -> &Handle
pub fn handle(&self) -> &Handle
The Handle<Buffer> currently being pointed to
Sourcepub fn declare_as_read(&self)
pub fn declare_as_read(&self)
Simulates a read without actually reading
This is useful if you want to tell Duat that you don’t want
has_changed to return true, but you don’t have a
Pass available to read the value.
This assumes that you don’t care about the active Buffer
possibly being swapped.
Sourcepub fn write<'a>(&'a self, pa: &'a mut Pass) -> &'a mut Buffer
pub fn write<'a>(&'a self, pa: &'a mut Pass) -> &'a mut Buffer
Reads the presently active Buffer
Sourcepub fn write_with_area<'a>(
&'a self,
pa: &'a mut Pass,
) -> (&'a mut Buffer, &'a mut Area)
pub fn write_with_area<'a>( &'a self, pa: &'a mut Pass, ) -> (&'a mut Buffer, &'a mut Area)
Sourcepub fn declare_written(&self)
pub fn declare_written(&self)
Simulates a write without actually writing
This is useful if you want to tell Duat that you want
has_changed to return true, but you don’t have a
Pass available to write the value with.
Trait Implementations§
Source§impl Clone for DynBuffer
impl Clone for DynBuffer
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
Returns a deep cloned duplicate of the value
In this case, what this means is that the clone and self
will have different internal pointers for the current
Buffer. So if, for example, you call
DynBuffer::swap_to_current on self, that will switch
self to point to the current Buffer, but the same will not
be done in the clone.
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DynBuffer
impl !RefUnwindSafe for DynBuffer
impl Send for DynBuffer
impl Sync for DynBuffer
impl Unpin for DynBuffer
impl !UnwindSafe for DynBuffer
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,
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.