pub struct StatusDatabase { /* private fields */ }
Expand description
Connection to an on-disk status database.
Implementations§
source§impl StatusDatabase
impl StatusDatabase
sourcepub fn open_readonly(
path: impl AsRef<Path>,
) -> Result<Option<StatusDatabase>, StatusError>
pub fn open_readonly( path: impl AsRef<Path>, ) -> Result<Option<StatusDatabase>, StatusError>
Open the database in readonly mode.
Returns None
if the database does not exist.
§Errors
Returns StatusError::Sqlite
if sqlite fails to open the database.
sourcepub fn open_or_create(
path: impl AsRef<Path>,
) -> Result<StatusDatabase, StatusError>
pub fn open_or_create( path: impl AsRef<Path>, ) -> Result<StatusDatabase, StatusError>
Open or creates the database in read-write mode.
§Errors
Returns StatusError::Sqlite
if sqlite fails to open or create the database.
Auto Trait Implementations§
impl Freeze for StatusDatabase
impl !RefUnwindSafe for StatusDatabase
impl Send for StatusDatabase
impl Sync for StatusDatabase
impl Unpin for StatusDatabase
impl !UnwindSafe for StatusDatabase
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<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.