pub struct VmgsThinClient(/* private fields */);
Expand description
A wrapper around VmgsClient
that restricts its API down to operations
that perform no storage IO.
This types is useful for keeping performance-sensitive code “honest” by making it harder for future refactors to accidentally introduce VMGS IO into performance hotpaths.
Implementations§
Source§impl VmgsThinClient
impl VmgsThinClient
Sourcepub fn new(vmgs_client: VmgsClient) -> Self
pub fn new(vmgs_client: VmgsClient) -> Self
Restrict an existing VmgsClient
to only non-IO operations.
Sourcepub async fn save(&self) -> Result<SavedVmgsState, VmgsClientError>
pub async fn save(&self) -> Result<SavedVmgsState, VmgsClientError>
See VmgsClient::save
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VmgsThinClient
impl !RefUnwindSafe for VmgsThinClient
impl Send for VmgsThinClient
impl Sync for VmgsThinClient
impl Unpin for VmgsThinClient
impl !UnwindSafe for VmgsThinClient
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