pub struct Snapshot { /* private fields */ }Expand description
Atomically replaceable immutable vocabulary, initially missing rather than silently empty.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn current(&self) -> Option<Arc<Vocabulary>>
pub fn current(&self) -> Option<Arc<Vocabulary>>
Clone the current immutable snapshot; absence keeps automatic policy unready.
Sourcepub fn replace(&mut self, source: &[u8]) -> Result<(), ParseError>
pub fn replace(&mut self, source: &[u8]) -> Result<(), ParseError>
Parse source as a Vim word list and publish it whole; a candidate with skipped lines is
still published. Readers that cloned the previous snapshot keep it unchanged.
§Errors
The candidate’s ParseError; the current snapshot is left unchanged.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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