Struct flo_ui::Resource
[−]
[src]
pub struct Resource<T> { /* fields omitted */ }
Represents a resource being managed by the resource manager. Resources are removed from the manager when all copies are dropped.
Methods
impl<T> Resource<T>
[src]
pub fn id(&self) -> u32
[src]
Retrieves the ID for this resource
pub fn name(&self) -> Option<String>
[src]
Retrieves the name for this resource, if it has one.
Note that if another resource has been assigned the same name, this might return the old name for a while (use the version in the resource manager if this matters)
pub fn get_arc(&self) -> Arc<T>
[src]
Retrieves an Arc reference of the resource
Trait Implementations
impl<T> Clone for Resource<T>
[src]
fn clone(&self) -> Resource<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Deref for Resource<T>
[src]
type Target = T
The resulting type after dereferencing.
ⓘImportant traits for &'a mut Wfn deref(&self) -> &T
[src]
ⓘImportant traits for &'a mut W
Dereferences the value.
impl<T> PartialEq for Resource<T>
[src]
fn eq(&self, other: &Resource<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T> Debug for Resource<T>
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more