pub enum PendingDocument {
File {
path: String,
final_path: String,
},
Memory {
docs: Arc<Mutex<HashMap<(Uuid, DocumentHmac), EncryptedDocument>>>,
key: (Uuid, DocumentHmac),
document: EncryptedDocument,
},
}Expand description
One write, readable once PendingDocument::promoted into the store that wrote it. On disk each write gets its own pending path, so writers of the same id and hmac never share one; in memory the handle holds the document itself.
Variants§
File
Memory
Fields
§
docs: Arc<Mutex<HashMap<(Uuid, DocumentHmac), EncryptedDocument>>>§
key: (Uuid, DocumentHmac)§
document: EncryptedDocumentImplementations§
Auto Trait Implementations§
impl Forget for PendingDocument
impl Freeze for PendingDocument
impl Move for PendingDocument
impl RefUnwindSafe for PendingDocument
impl Send for PendingDocument
impl Sync for PendingDocument
impl Unpin for PendingDocument
impl UnsafeUnpin for PendingDocument
impl UnwindSafe for PendingDocument
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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