Struct CapabilityKey
pub struct CapabilityKey<T>where
T: 'static + ?Sized,{
pub name: &'static str,
/* private fields */
}Expand description
A capability: its name (horizon:items, mymod:chemicals), the handler trait T it answers
with, and the game’s own provider, if the game has one.
Fields§
§name: &'static strThe name.
Implementations§
§impl<T> CapabilityKey<T>where
T: 'static + ?Sized,
impl<T> CapabilityKey<T>where
T: 'static + ?Sized,
pub const fn new(name: &'static str) -> CapabilityKey<T>
pub const fn new(name: &'static str) -> CapabilityKey<T>
A mod’s own capability, answered only by the parts registered for it.
Auto Trait Implementations§
impl<T> Freeze for CapabilityKey<T>where
T: ?Sized,
impl<T> RefUnwindSafe for CapabilityKey<T>where
T: ?Sized,
impl<T> Send for CapabilityKey<T>where
T: ?Sized,
impl<T> Sync for CapabilityKey<T>where
T: ?Sized,
impl<T> Unpin for CapabilityKey<T>where
T: ?Sized,
impl<T> UnsafeUnpin for CapabilityKey<T>where
T: ?Sized,
impl<T> UnwindSafe for CapabilityKey<T>where
T: ?Sized,
Blanket Implementations§
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