pub struct ClientPrepared { /* private fields */ }Expand description
Tracks the client-side → canonical name mapping for a single client session.
Implementations§
Source§impl ClientPrepared
impl ClientPrepared
pub fn new() -> Self
Sourcepub fn register(&mut self, parse: &Parse, store: &mut StatementStore) -> String
pub fn register(&mut self, parse: &Parse, store: &mut StatementStore) -> String
Register a client-side name for a Parse, returning the canonical name.
Sourcepub fn resolve(&self, client_name: &str) -> Option<&str>
pub fn resolve(&self, client_name: &str) -> Option<&str>
Look up the canonical name for a client-side statement name. Returns
None for unnamed statements (the empty string), which are always
forwarded as-is.
Sourcepub fn remove(&mut self, client_name: &str, store: &mut StatementStore)
pub fn remove(&mut self, client_name: &str, store: &mut StatementStore)
Remove a client-side name mapping (client sent Close for this statement).
Sourcepub fn release_all(&mut self, store: &mut StatementStore)
pub fn release_all(&mut self, store: &mut StatementStore)
Release all references held by this client. Call when the client disconnects to allow the global store to reclaim memory.
Trait Implementations§
Source§impl Default for ClientPrepared
impl Default for ClientPrepared
Source§fn default() -> ClientPrepared
fn default() -> ClientPrepared
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientPrepared
impl RefUnwindSafe for ClientPrepared
impl Send for ClientPrepared
impl Sync for ClientPrepared
impl Unpin for ClientPrepared
impl UnsafeUnpin for ClientPrepared
impl UnwindSafe for ClientPrepared
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