pub struct TableGatewayStore { /* private fields */ }Expand description
Gateway store that keeps every record kind in its own SIM Table.
Each slot is a SIM table value guarded by a shared Cx; records are
wrapped as opaque table values keyed by content id or string id. Implements
GatewayStore, GatewayResponseObjectStore, and GatewayStateStore.
Implementations§
Trait Implementations§
Source§impl Default for TableGatewayStore
impl Default for TableGatewayStore
Source§impl GatewayResponseObjectStore for TableGatewayStore
impl GatewayResponseObjectStore for TableGatewayStore
Source§fn put_response_object(&mut self, response: StoredGatewayResponse) -> Result<()>
fn put_response_object(&mut self, response: StoredGatewayResponse) -> Result<()>
Stores a response object, replacing any existing entry with the same id.
Source§fn response_object(&self, response_id: &str) -> Option<StoredGatewayResponse>
fn response_object(&self, response_id: &str) -> Option<StoredGatewayResponse>
Returns the response object with the given id, if present.
Source§impl GatewayStateStore for TableGatewayStore
impl GatewayStateStore for TableGatewayStore
Source§fn put_file(&mut self, file: GatewayFile, bytes: Vec<u8>) -> Result<()>
fn put_file(&mut self, file: GatewayFile, bytes: Vec<u8>) -> Result<()>
Stores a file record together with its raw bytes.
Source§fn file(&self, file_id: &str) -> Option<GatewayFile>
fn file(&self, file_id: &str) -> Option<GatewayFile>
Returns the file record with the given id, if present.
Source§fn file_bytes(&self, file_id: &str) -> Option<Vec<u8>>
fn file_bytes(&self, file_id: &str) -> Option<Vec<u8>>
Returns the raw bytes for the given file id, if present.
Source§fn put_batch(&mut self, batch: GatewayBatch) -> Result<()>
fn put_batch(&mut self, batch: GatewayBatch) -> Result<()>
Stores a batch record, replacing any existing entry with the same id.
Source§fn batch(&self, batch_id: &str) -> Option<GatewayBatch>
fn batch(&self, batch_id: &str) -> Option<GatewayBatch>
Returns the batch with the given id, if present.
Source§fn put_thread(&mut self, thread: GatewayThread) -> Result<()>
fn put_thread(&mut self, thread: GatewayThread) -> Result<()>
Stores a thread record, replacing any existing entry with the same id.
Source§fn thread(&self, thread_id: &str) -> Option<GatewayThread>
fn thread(&self, thread_id: &str) -> Option<GatewayThread>
Returns the thread with the given id, if present.
Source§fn put_thread_message(&mut self, message: GatewayThreadMessage) -> Result<()>
fn put_thread_message(&mut self, message: GatewayThreadMessage) -> Result<()>
Appends a message to its thread.
Source§fn thread_messages(&self, thread_id: &str) -> Vec<GatewayThreadMessage>
fn thread_messages(&self, thread_id: &str) -> Vec<GatewayThreadMessage>
Returns the messages for the given thread id, in insertion order.
Source§fn put_vector_store(&mut self, vector_store: GatewayVectorStore) -> Result<()>
fn put_vector_store(&mut self, vector_store: GatewayVectorStore) -> Result<()>
Stores a vector store, replacing any existing entry with the same id.
Source§fn vector_store(&self, vector_store_id: &str) -> Option<GatewayVectorStore>
fn vector_store(&self, vector_store_id: &str) -> Option<GatewayVectorStore>
Returns the vector store with the given id, if present.
Source§impl GatewayStore for TableGatewayStore
impl GatewayStore for TableGatewayStore
Source§fn put_request(&mut self, id: ContentId, request: GatewayRequest) -> Result<()>
fn put_request(&mut self, id: ContentId, request: GatewayRequest) -> Result<()>
Stores a request under its content id.
Source§fn request(&self, id: &ContentId) -> Option<GatewayRequest>
fn request(&self, id: &ContentId) -> Option<GatewayRequest>
Returns the request stored under
id, if present.Source§fn put_run(&mut self, id: ContentId, run: GatewayRun) -> Result<()>
fn put_run(&mut self, id: ContentId, run: GatewayRun) -> Result<()>
Stores a run under its content id.
Source§fn run(&self, id: &ContentId) -> Option<GatewayRun>
fn run(&self, id: &ContentId) -> Option<GatewayRun>
Returns the run stored under
id, if present.Source§fn put_event(&mut self, id: ContentId, event: GatewayEvent) -> Result<()>
fn put_event(&mut self, id: ContentId, event: GatewayEvent) -> Result<()>
Stores an event under its content id.
Source§fn event(&self, id: &ContentId) -> Option<GatewayEvent>
fn event(&self, id: &ContentId) -> Option<GatewayEvent>
Returns the event stored under
id, if present.Source§fn put_response(
&mut self,
id: ContentId,
response: GatewayResponse,
) -> Result<()>
fn put_response( &mut self, id: ContentId, response: GatewayResponse, ) -> Result<()>
Stores a response under its content id.
Auto Trait Implementations§
impl !Freeze for TableGatewayStore
impl !RefUnwindSafe for TableGatewayStore
impl !UnwindSafe for TableGatewayStore
impl Send for TableGatewayStore
impl Sync for TableGatewayStore
impl Unpin for TableGatewayStore
impl UnsafeUnpin for TableGatewayStore
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