pub struct Resource<'t, 'a> { /* private fields */ }Expand description
One resource of a ResourceTable, across all its configurations.
Implementations§
Source§impl<'t, 'a> Resource<'t, 'a>
impl<'t, 'a> Resource<'t, 'a>
pub fn id(&self) -> ResourceId
Sourcepub fn name(&self) -> Cow<'a, str>
pub fn name(&self) -> Cow<'a, str>
The entry name, from the first configuration that defines it.
pub fn type_name(&self) -> &'t str
pub fn is_public(&self) -> bool
Sourcepub fn values(&self) -> impl Iterator<Item = (&'t Config, EntryValue<'a>)> + 't
pub fn values(&self) -> impl Iterator<Item = (&'t Config, EntryValue<'a>)> + 't
The defined values, one per configuration.
Sourcepub fn value(&self, config: &Config) -> Option<EntryValue<'a>>
pub fn value(&self, config: &Config) -> Option<EntryValue<'a>>
The value for exactly config, if defined.
Sourcepub fn default_value(&self) -> Option<EntryValue<'a>>
pub fn default_value(&self) -> Option<EntryValue<'a>>
The value in the default configuration.
Trait Implementations§
impl<'t, 'a> Copy for Resource<'t, 'a>
Auto Trait Implementations§
impl<'t, 'a> Freeze for Resource<'t, 'a>
impl<'t, 'a> RefUnwindSafe for Resource<'t, 'a>
impl<'t, 'a> Send for Resource<'t, 'a>
impl<'t, 'a> Sync for Resource<'t, 'a>
impl<'t, 'a> Unpin for Resource<'t, 'a>
impl<'t, 'a> UnsafeUnpin for Resource<'t, 'a>
impl<'t, 'a> UnwindSafe for Resource<'t, 'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more