pub struct Unique { /* private fields */ }
Expand description
We collect all global variables here.
These variable cannot be initialized as static variables, because
their initialization function all rely on non-const fn (e.g.
HashMap::new()
).
In the same time, all these variables should not be wrapped in any
kind of smark pointers / locks (e.g. Arc
, RwLock
), because
they are used in concurrent environment, and it’s hard, if not
impossible, to acquire a exclusive lock in any context.
Implementations§
Source§impl Unique
impl Unique
pub fn mut_page_cache() -> RwLockWriteGuard<'static, PageCache>
pub fn buffer_pool_pod() -> Arc<RwLock<PageCache>>
pub fn concurrent_status() -> &'static ConcurrentStatus
pub fn catalog() -> RwLockReadGuard<'static, Catalog>
pub fn mut_catalog() -> RwLockWriteGuard<'static, Catalog>
pub fn log_file() -> RwLockReadGuard<'static, LogManager>
pub fn mut_log_manager() -> RwLockWriteGuard<'static, LogManager>
pub fn log_file_pod() -> Arc<RwLock<LogManager>>
pub fn global() -> &'static Self
Auto Trait Implementations§
impl Freeze for Unique
impl RefUnwindSafe for Unique
impl Send for Unique
impl Sync for Unique
impl Unpin for Unique
impl UnwindSafe for Unique
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