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 more