pub struct MemoryCtx { /* private fields */ }Expand description
Default CtxStorage impl — Arc<Mutex<Value>> wrapper。
Send + Sync かつ &self write OK = Arc<MemoryCtx> で外部 task と共有可能。
Implementations§
Trait Implementations§
Source§impl CtxStorage for MemoryCtx
impl CtxStorage for MemoryCtx
Source§fn read(&self, path: &str) -> Result<Value, EvalError>
fn read(&self, path: &str) -> Result<Value, EvalError>
Read a single path (
$.a.b.c 形式) from ctx.Source§fn write(&self, path: &str, value: Value) -> Result<(), EvalError>
fn write(&self, path: &str, value: Value) -> Result<(), EvalError>
Write
value to path ($.a.b.c 形式).Auto Trait Implementations§
impl !Freeze for MemoryCtx
impl RefUnwindSafe for MemoryCtx
impl Send for MemoryCtx
impl Sync for MemoryCtx
impl Unpin for MemoryCtx
impl UnsafeUnpin for MemoryCtx
impl UnwindSafe for MemoryCtx
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