pub trait Resource<Id: TypedId>: 'static + WasmNotSendSync {
const TYPE: &'static str;
// Required methods
fn as_info(&self) -> &ResourceInfo<Id>;
fn as_info_mut(&mut self) -> &mut ResourceInfo<Id>;
// Provided methods
fn label(&self) -> String { ... }
fn ref_count(self: &Arc<Self>) -> usize { ... }
fn is_unique(self: &Arc<Self>) -> bool { ... }
fn is_equal(&self, other: &Self) -> bool { ... }
}
Required Associated Constants§
Required Methods§
fn as_info(&self) -> &ResourceInfo<Id>
fn as_info_mut(&mut self) -> &mut ResourceInfo<Id>
Provided Methods§
fn label(&self) -> String
fn ref_count(self: &Arc<Self>) -> usize
fn is_unique(self: &Arc<Self>) -> bool
fn is_equal(&self, other: &Self) -> bool
Object Safety§
This trait is not object safe.