Trait wayland_server::Destroy
[−]
[src]
pub trait Destroy<R: Resource> { fn destroy(resource: &R); }
A trait to handle destruction of ressources.
This is usefull if you need to deallocate user data for example.
This is a trait with a single static method rather (than a freestanding function) in order to internally profit of static dispatch.
Required Methods
fn destroy(resource: &R)
Destructor of a resource
This function is called right before a resource is destroyed, if it has been assigned.
To assign a destructor to a resource, see EventLoopHandle::register_with_destructor
.