pub struct AutoShutdown {}
Expand description
A utility struct that ensure to close and drop global data sources when it goes out scope.
This struct implements the Drop
trait, and its drop
method handles the closing and
dropping of registered global data sources.
Therefore this ensures that these operations are automatically executed at the end of
the scope.
NOTE: Do not receive this an instance of this struct into an anonymous variable
(let _ = ...
), because an anonymous variable dropped immediately at that point.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AutoShutdown
impl RefUnwindSafe for AutoShutdown
impl Send for AutoShutdown
impl Sync for AutoShutdown
impl Unpin for AutoShutdown
impl UnwindSafe for AutoShutdown
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