pub struct SwarmStore { /* private fields */ }Expand description
Cloneable access to the gateway’s durable swarm catalog.
Implementations§
Source§impl SwarmStore
impl SwarmStore
Sourcepub async fn summaries(&self) -> Result<Vec<SwarmSummary>>
pub async fn summaries(&self) -> Result<Vec<SwarmSummary>>
Returns every swarm ordered by its stable identifier.
Sourcepub async fn snapshot_for_session(
&self,
session_id: &str,
) -> Result<Option<SwarmSnapshot>>
pub async fn snapshot_for_session( &self, session_id: &str, ) -> Result<Option<SwarmSnapshot>>
Resolves the swarm and handle for one participating session.
Sourcepub async fn post(
&self,
sender_session_id: &str,
text: String,
) -> Result<SwarmPost>
pub async fn post( &self, sender_session_id: &str, text: String, ) -> Result<SwarmPost>
Posts one durable board entry and resolves all @handle recipients.
Sourcepub async fn board_page(
&self,
swarm_id: &str,
before_sequence: Option<u64>,
limit: usize,
) -> Result<BoardPage>
pub async fn board_page( &self, swarm_id: &str, before_sequence: Option<u64>, limit: usize, ) -> Result<BoardPage>
Loads one newest-first board page before an optional sequence cursor.
Sourcepub async fn pending_deliveries(
&self,
target_session_id: &str,
) -> Result<Vec<PendingDelivery>>
pub async fn pending_deliveries( &self, target_session_id: &str, ) -> Result<Vec<PendingDelivery>>
Returns messages still awaiting one target session’s acknowledgement.
Trait Implementations§
Source§impl Clone for SwarmStore
impl Clone for SwarmStore
Source§fn clone(&self) -> SwarmStore
fn clone(&self) -> SwarmStore
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 SwarmBackend for SwarmStore
impl SwarmBackend for SwarmStore
Source§fn active<'a>(&'a self, session_id: &'a str) -> BoxFuture<'a, Result<bool>>
fn active<'a>(&'a self, session_id: &'a str) -> BoxFuture<'a, Result<bool>>
Reports whether the session currently belongs to a swarm.
Source§fn roster<'a>(&'a self, session_id: &'a str) -> BoxFuture<'a, Result<String>>
fn roster<'a>(&'a self, session_id: &'a str) -> BoxFuture<'a, Result<String>>
Returns the caller’s current roster as model-readable text.
Auto Trait Implementations§
impl !RefUnwindSafe for SwarmStore
impl !UnwindSafe for SwarmStore
impl Freeze for SwarmStore
impl Send for SwarmStore
impl Sync for SwarmStore
impl Unpin for SwarmStore
impl UnsafeUnpin for SwarmStore
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