pub struct DatabaseInstanceContext {
pub database: Database,
pub database_instance_id: u64,
pub logger: Arc<DatabaseLogger>,
pub relational_db: Arc<RelationalDB>,
}
Fields§
§database: Database
§database_instance_id: u64
§logger: Arc<DatabaseLogger>
§relational_db: Arc<RelationalDB>
Implementations§
source§impl DatabaseInstanceContext
impl DatabaseInstanceContext
pub fn from_database( config: Config, database: Database, instance_id: u64, root_db_path: PathBuf, rt: Handle ) -> Result<Self>
pub fn scheduler_db_path(&self, root_db_path: PathBuf) -> PathBuf
sourcepub fn durability_size_on_disk(&self) -> Result<u64>
pub fn durability_size_on_disk(&self) -> Result<u64>
The number of bytes on disk occupied by the database’s durability layer.
An in-memory database will return Ok(0)
.
sourcepub fn log_file_size(&self) -> Result<u64, DBError>
pub fn log_file_size(&self) -> Result<u64, DBError>
The size of the log file.
sourcepub fn total_disk_usage(&self) -> TotalDiskUsage
pub fn total_disk_usage(&self) -> TotalDiskUsage
Obtain an array which can be summed to obtain the total disk usage.
Some sources of size-on-disk may error, in which case the corresponding array element will be None.
Trait Implementations§
source§impl Clone for DatabaseInstanceContext
impl Clone for DatabaseInstanceContext
source§fn clone(&self) -> DatabaseInstanceContext
fn clone(&self) -> DatabaseInstanceContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DatabaseInstanceContext
impl !RefUnwindSafe for DatabaseInstanceContext
impl Send for DatabaseInstanceContext
impl Sync for DatabaseInstanceContext
impl Unpin for DatabaseInstanceContext
impl !UnwindSafe for DatabaseInstanceContext
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more