Trait runa_orbiter::shell::buffers::BufferLike
source · pub trait BufferLike: EventSource<BufferEvent> + Debug + 'static {
// Required methods
fn damage(&self);
fn clear_damage(&self);
fn get_damage(&self) -> bool;
fn dimension(&self) -> Extent<u32, Buffer>;
fn object_id(&self) -> u32;
fn release(&self);
fn acquire(&self);
}
Expand description
The base buffer trait.
Required Methods§
sourcefn clear_damage(&self)
fn clear_damage(&self)
Clear buffer damage
sourcefn get_damage(&self) -> bool
fn get_damage(&self) -> bool
Returns whether the buffer is damaged
sourcefn object_id(&self) -> u32
fn object_id(&self) -> u32
Return the object id for the buffer object. Used for sending release event to the client.
sourcefn release(&self)
fn release(&self)
Send the Released event for this buffer. After this is called, the
buffer should prevent any further access of the client resources.
Repeated calls to this function without intervening calls to
BufferLike::acquire
are allowed, but should have no effect.
When a buffer is just created, it is in the released state.