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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more