pub struct RemoteMemoryClient { /* private fields */ }Expand description
Authenticated HTTP implementation of MemoryStore.
Implementations§
Source§impl RemoteMemoryClient
impl RemoteMemoryClient
Sourcepub fn new(
endpoint: &str,
namespace: String,
token: RemoteToken,
) -> Result<Self, RemoteClientError>
pub fn new( endpoint: &str, namespace: String, token: RemoteToken, ) -> Result<Self, RemoteClientError>
Creates a client bound to one validated namespace.
Sourcepub async fn session(&self) -> Result<RemoteRole, RemoteClientError>
pub async fn session(&self) -> Result<RemoteRole, RemoteClientError>
Negotiates and caches the authenticated remote role.
Trait Implementations§
Source§impl Clone for RemoteMemoryClient
impl Clone for RemoteMemoryClient
Source§fn clone(&self) -> RemoteMemoryClient
fn clone(&self) -> RemoteMemoryClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemoteMemoryClient
impl Debug for RemoteMemoryClient
Source§impl MemoryStore for RemoteMemoryClient
impl MemoryStore for RemoteMemoryClient
Source§fn scan(
&self,
query: &str,
limit: usize,
) -> impl Future<Output = Result<MemoryScan, MemoryError>> + Send
fn scan( &self, query: &str, limit: usize, ) -> impl Future<Output = Result<MemoryScan, MemoryError>> + Send
Searches visible records and records scan telemetry.
Source§fn read(
&self,
ids: &[i64],
keys: &[MemoryKey],
) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
fn read( &self, ids: &[i64], keys: &[MemoryKey], ) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
Reads unversioned IDs and versioned keys, recording use telemetry.
Source§fn list(
&self,
) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
fn list( &self, ) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
Lists a deterministic window that excludes expired probationary records. Read more
Source§fn put(
&self,
content: &str,
replacement: Option<MemoryKey>,
) -> impl Future<Output = Result<MemoryRecord, MemoryError>> + Send
fn put( &self, content: &str, replacement: Option<MemoryKey>, ) -> impl Future<Output = Result<MemoryRecord, MemoryError>> + Send
Inserts content or compare-and-swap replaces
replacement.Source§fn delete(
&self,
key: MemoryKey,
) -> impl Future<Output = Result<(), MemoryError>> + Send
fn delete( &self, key: MemoryKey, ) -> impl Future<Output = Result<(), MemoryError>> + Send
Compare-and-swap deletes
key. Read moreSource§fn sync(
&self,
memories: &[MemoryRecord],
) -> impl Future<Output = Result<SyncReport, MemoryError>> + Send
fn sync( &self, memories: &[MemoryRecord], ) -> impl Future<Output = Result<SyncReport, MemoryError>> + Send
Atomically applies an authoritative full snapshot to the owned namespace. Read more
Source§fn export_page(
&self,
namespaces: Option<&[String]>,
cursor: Option<&ExportCursor>,
limit: usize,
) -> impl Future<Output = Result<(Vec<MemoryRecord>, Option<ExportCursor>), MemoryError>> + Send
fn export_page( &self, namespaces: Option<&[String]>, cursor: Option<&ExportCursor>, limit: usize, ) -> impl Future<Output = Result<(Vec<MemoryRecord>, Option<ExportCursor>), MemoryError>> + Send
Source§fn export_all(
&self,
namespaces: Option<&[String]>,
) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
fn export_all( &self, namespaces: Option<&[String]>, ) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
Collects a complete bounded export through the paginated storage contract. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RemoteMemoryClient
impl !UnwindSafe for RemoteMemoryClient
impl Freeze for RemoteMemoryClient
impl Send for RemoteMemoryClient
impl Sync for RemoteMemoryClient
impl Unpin for RemoteMemoryClient
impl UnsafeUnpin for RemoteMemoryClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.