MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / writable_db

Method writable_db

atomic-core/src/pristine/txn/pristine.rs:250–258  ·  view source on GitHub ↗

The writable database handle, or an error for read-only pristines.

(&self)

Source from the content-addressed store, hash-verified

248
249 /// The writable database handle, or an error for read-only pristines.
250 fn writable_db(&self) -> PristineResult<&Database> {
251 match self {
252 Self::Writable(db, _) => Ok(db),
253 Self::ReadOnly(_) => Err(PristineError::Io(std::io::Error::new(
254 std::io::ErrorKind::PermissionDenied,
255 "cannot write through a read-only pristine handle",
256 ))),
257 }
258 }
259}
260
261impl Pristine {

Calls

no outgoing calls