pub struct DocumentPool { /* private fields */ }Available on crate feature
concurrency only.Expand description
Thread-safe document pool for managing multiple documents
Implementations§
Source§impl DocumentPool
impl DocumentPool
Sourcepub fn add_document(&self, document: EditorDocument) -> Result<String>
pub fn add_document(&self, document: EditorDocument) -> Result<String>
Add a document to the pool
Sourcepub fn get_document(&self, id: &str) -> Result<SyncDocument>
pub fn get_document(&self, id: &str) -> Result<SyncDocument>
Get a document from the pool
Sourcepub fn remove_document(&self, id: &str) -> Result<()>
pub fn remove_document(&self, id: &str) -> Result<()>
Remove a document from the pool
Sourcepub fn list_documents(&self) -> Result<Vec<String>>
pub fn list_documents(&self) -> Result<Vec<String>>
List all document IDs in the pool
Sourcepub fn document_count(&self) -> Result<usize>
pub fn document_count(&self) -> Result<usize>
Get the number of documents in the pool
Trait Implementations§
Source§impl Clone for DocumentPool
impl Clone for DocumentPool
Source§fn clone(&self) -> DocumentPool
fn clone(&self) -> DocumentPool
Returns a duplicate 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 moreSource§impl Debug for DocumentPool
impl Debug for DocumentPool
Auto Trait Implementations§
impl Freeze for DocumentPool
impl RefUnwindSafe for DocumentPool
impl !Send for DocumentPool
impl !Sync for DocumentPool
impl Unpin for DocumentPool
impl UnwindSafe for DocumentPool
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