pub struct DocumentStore { /* private fields */ }Expand description
Thread-safe document store
Implementations§
Source§impl DocumentStore
impl DocumentStore
Sourcepub fn new() -> DocumentStore
pub fn new() -> DocumentStore
Create a new empty store
Sourcepub fn uri_key(uri: &str) -> String
pub fn uri_key(uri: &str) -> String
Normalize a URI to a consistent key This handles platform differences and ensures consistent lookups
Sourcepub fn update(&self, uri: &str, version: i32, text: String) -> bool
pub fn update(&self, uri: &str, version: i32, text: String) -> bool
Update a document’s content
Sourcepub fn all_documents(&self) -> Vec<Document>
pub fn all_documents(&self) -> Vec<Document>
Get all open documents
Trait Implementations§
Source§impl Clone for DocumentStore
impl Clone for DocumentStore
Source§fn clone(&self) -> DocumentStore
fn clone(&self) -> DocumentStore
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 DocumentStore
impl Debug for DocumentStore
Source§impl Default for DocumentStore
impl Default for DocumentStore
Source§fn default() -> DocumentStore
fn default() -> DocumentStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DocumentStore
impl RefUnwindSafe for DocumentStore
impl Send for DocumentStore
impl Sync for DocumentStore
impl Unpin for DocumentStore
impl UnsafeUnpin for DocumentStore
impl UnwindSafe for DocumentStore
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