pub trait Handle: Any {
type R: Resource;
// Required methods
fn wrap(r: Self::R) -> Self
where Self: Sized;
fn clone_handle(&self) -> Result<Self, <Self::R as Resource>::Error>
where Self: Sized;
fn boxed_clone_handle(
&self
) -> Result<Box<dyn Handle<R = Self::R>>, <Self::R as Resource>::Error>;
fn handle_ref(&self) -> &Self::R;
fn get_mut(&mut self) -> Option<&mut Self::R>;
fn ensure_exclusive(&mut self) -> Result<(), <Self::R as Resource>::Error>;
// Provided methods
fn eq_ref(&self, other: &dyn Handle<R = Self::R>) -> bool { ... }
fn make_mut(&mut self) -> Result<&mut Self::R, <Self::R as Resource>::Error> { ... }
}