pub struct Keeper<T> {
pub write: fn(&T, &mut Pool) -> GeopResult<String>,
pub read: fn(&str, &Pool) -> GeopResult<T>,
}Expand description
How the values of a target type are written to be read back exactly, in another process (see the module): a target without one is made again in every process.
Fields§
§write: fn(&T, &mut Pool) -> GeopResult<String>The value as JSON, its parts that other values may share put in the pool.
read: fn(&str, &Pool) -> GeopResult<T>The value write wrote, its parts taken from the pool.
Implementations§
Source§impl<T: Serialize + DeserializeOwned> Keeper<T>
impl<T: Serialize + DeserializeOwned> Keeper<T>
Sourcepub const SERDE: Self
pub const SERDE: Self
A value written by its own serde, which must write it exactly
(geop_core_math::exact): read back, it is the value written.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Keeper<T>
impl<T> RefUnwindSafe for Keeper<T>
impl<T> Send for Keeper<T>
impl<T> Sync for Keeper<T>
impl<T> Unpin for Keeper<T>
impl<T> UnsafeUnpin for Keeper<T>
impl<T> UnwindSafe for Keeper<T>
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