pub struct NativeFacilities { /* private fields */ }Implementations§
Source§impl NativeFacilities
impl NativeFacilities
pub fn new() -> Self
pub fn with<T: Any>( self, name: impl Into<String>, value: T, ) -> Result<Self, RuntimeFailure>
Sourcepub fn with_factory<T: Any>(
self,
name: impl Into<String>,
create: impl Fn() -> Result<T, RuntimeFailure> + 'static,
) -> Result<Self, RuntimeFailure>
pub fn with_factory<T: Any>( self, name: impl Into<String>, create: impl Fn() -> Result<T, RuntimeFailure> + 'static, ) -> Result<Self, RuntimeFailure>
Registers an owner factory called when a generation constructs its typed input.
pub fn require<T: Any + Clone>(&self, name: &str) -> Result<T, RuntimeFailure>
Trait Implementations§
Source§impl Clone for NativeFacilities
impl Clone for NativeFacilities
Source§impl Debug for NativeFacilities
impl Debug for NativeFacilities
Auto Trait Implementations§
impl !RefUnwindSafe for NativeFacilities
impl !Send for NativeFacilities
impl !Sync for NativeFacilities
impl !UnwindSafe for NativeFacilities
impl Freeze for NativeFacilities
impl Unpin for NativeFacilities
impl UnsafeUnpin for NativeFacilities
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