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 PendingDocumentwhere
Atomic<usize>: RefUnwindSafe,
Mutex<HashMap<(Uuid, [u8; 32]), AESEncrypted<Vec<u8>>>>: RefUnwindSafe,
impl Send for PendingDocument
impl Sync for PendingDocument
impl Unpin for PendingDocument
impl UnsafeUnpin for PendingDocumentwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Mutex<HashMap<(Uuid, [u8; 32]), AESEncrypted<Vec<u8>>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<HashMap<(Uuid, [u8; 32]), AESEncrypted<Vec<u8>>>>>>: UnsafeUnpin,
PhantomData<Vec<u8>>: UnsafeUnpin,
impl UnwindSafe for PendingDocumentwhere
RawVecInner: UnwindSafe,
Arc<Mutex<HashMap<(Uuid, [u8; 32]), AESEncrypted<Vec<u8>>>>>: UnwindSafe,
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