pub struct EscribaHost {
pub snapshot: EditorSnapshot,
pub effects: Vec<HostEffect>,
}Expand description
The Lisp host: a read snapshot + an accumulating effect log. Owned
(no borrows) so it satisfies Interpreter<H>’s H: 'static; passed
by &mut per eval call.
Fields§
§snapshot: EditorSnapshot§effects: Vec<HostEffect>Implementations§
Source§impl EscribaHost
impl EscribaHost
pub fn new() -> Self
Sourcepub fn with_snapshot(snapshot: EditorSnapshot) -> Self
pub fn with_snapshot(snapshot: EditorSnapshot) -> Self
A host seeded with a read snapshot (and an empty effect log).
Sourcepub fn take_effects(&mut self) -> Vec<HostEffect>
pub fn take_effects(&mut self) -> Vec<HostEffect>
Drain the accumulated effects, leaving the log empty — the runtime calls this after eval to apply them.
Trait Implementations§
Source§impl Clone for EscribaHost
impl Clone for EscribaHost
Source§fn clone(&self) -> EscribaHost
fn clone(&self) -> EscribaHost
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EscribaHost
impl Debug for EscribaHost
Source§impl Default for EscribaHost
impl Default for EscribaHost
Source§fn default() -> EscribaHost
fn default() -> EscribaHost
Returns the “default value” for a type. Read more
impl Eq for EscribaHost
Source§impl PartialEq for EscribaHost
impl PartialEq for EscribaHost
impl StructuralPartialEq for EscribaHost
Auto Trait Implementations§
impl Freeze for EscribaHost
impl RefUnwindSafe for EscribaHost
impl Send for EscribaHost
impl Sync for EscribaHost
impl Unpin for EscribaHost
impl UnsafeUnpin for EscribaHost
impl UnwindSafe for EscribaHost
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