pub struct Circles<'a> { /* private fields */ }Expand description
A borrowed namespace whose work remains owned by the open store. Making a
circle and each change is its CovenWrite step in a write of its own,
returning the operation’s id; a change returns None when the applied
state already has what it asks for (§11.1). Lists read the committed state, as their subscriptions do.
Implementations§
Source§impl<'a> Circles<'a>
impl<'a> Circles<'a>
Sourcepub async fn reset(&self, circle: CircleId) -> Result<(), SyncError>
pub async fn reset(&self, circle: CircleId) -> Result<(), SyncError>
Reset this circle to a snapshot of this device’s state (§19.4).
Sourcepub async fn create(
&self,
name: &str,
) -> Result<(CircleId, OperationId), SyncError>
pub async fn create( &self, name: &str, ) -> Result<(CircleId, OperationId), SyncError>
Make a circle (CovenWrite::create_circle).
Sourcepub async fn rename(
&self,
circle: CircleId,
name: &str,
) -> Result<Option<OperationId>, SyncError>
pub async fn rename( &self, circle: CircleId, name: &str, ) -> Result<Option<OperationId>, SyncError>
Rename a circle (CovenWrite::rename_circle).
Sourcepub async fn delete(
&self,
circle: CircleId,
) -> Result<Option<OperationId>, SyncError>
pub async fn delete( &self, circle: CircleId, ) -> Result<Option<OperationId>, SyncError>
Delete a circle (CovenWrite::delete_circle).
Sourcepub async fn add_member(
&self,
circle: CircleId,
member: &MemberId,
) -> Result<Option<OperationId>, SyncError>
pub async fn add_member( &self, circle: CircleId, member: &MemberId, ) -> Result<Option<OperationId>, SyncError>
Add a store member to a circle (CovenWrite::add_circle_member).
Sourcepub async fn remove_member(
&self,
circle: CircleId,
member: &MemberId,
) -> Result<Option<OperationId>, SyncError>
pub async fn remove_member( &self, circle: CircleId, member: &MemberId, ) -> Result<Option<OperationId>, SyncError>
Remove a member from a circle (CovenWrite::remove_circle_member).
Sourcepub async fn list(&self) -> CovenResult<Vec<Circle>>
pub async fn list(&self) -> CovenResult<Vec<Circle>>
The circles this member is in.
Sourcepub fn subscribe_list(&self) -> LiveQuery<Vec<Circle>, CovenError>
pub fn subscribe_list(&self) -> LiveQuery<Vec<Circle>, CovenError>
The same circle-list query, live (E4).
Sourcepub async fn members(
&self,
circle: CircleId,
) -> CovenResult<Vec<CircleMemberInfo>>
pub async fn members( &self, circle: CircleId, ) -> CovenResult<Vec<CircleMemberInfo>>
A circle’s members who are still in the store.
Sourcepub fn subscribe_members(
&self,
circle: CircleId,
) -> LiveQuery<Vec<CircleMemberInfo>, CovenError>
pub fn subscribe_members( &self, circle: CircleId, ) -> LiveQuery<Vec<CircleMemberInfo>, CovenError>
The same query for this circle’s members, live (E4).
Auto Trait Implementations§
impl<'a> Freeze for Circles<'a>
impl<'a> !RefUnwindSafe for Circles<'a>
impl<'a> Send for Circles<'a>
impl<'a> Sync for Circles<'a>
impl<'a> Unpin for Circles<'a>
impl<'a> UnsafeUnpin for Circles<'a>
impl<'a> !UnwindSafe for Circles<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more