pub struct ServiceLock<S> { /* private fields */ }Expand description
§Safety
- Must be created at the highest scope
- Must not be moved
Implementations§
Source§impl<S: 'static> ServiceLock<S>
impl<S: 'static> ServiceLock<S>
pub fn new(s: S) -> Self
pub unsafe fn get(&self) -> &'static S
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for ServiceLock<S>
impl<S> RefUnwindSafe for ServiceLock<S>where
S: RefUnwindSafe,
impl<S> !Send for ServiceLock<S>
impl<S> !Sync for ServiceLock<S>
impl<S> !Unpin for ServiceLock<S>
impl<S> !UnsafeUnpin for ServiceLock<S>
impl<S> UnwindSafe for ServiceLock<S>where
S: RefUnwindSafe,
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