ResourceKey
enum · ferroui-base · v0.5.0
enum ResourceKey
The key of a resource in a resource dictionary.
The object model this library mirrors uses arbitrary objects with value
equality as keys. The keys used in practice are strings and types (a
control theme is keyed by the type it targets), which get their own cheap
variants; any other hashable value can be used through
ResourceKey::object.
Members
String
String(std::rc::Rc<str>)
A string key.
Type
Type(&'static crate::TypeInfo)
A type key.
Object
Object(std::rc::Rc<dyn ResourceKeyObject>)
Any other key.
object
fn object<T: Eq + Hash + 'static>(value: T) -> Self
Creates a key from any hashable value.
as_str
fn as_str(self: &Self) -> Option<&str>
The key as a string, if it is one.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeResourceKeyObjectPropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherClonePartialEqEqHashDebugDisplayFrom<&str>From<String>From<&'static TypeInfo>From<&ResourceKey>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.