pub struct SinkholeLinks<'a> { /* private fields */ }Expand description
Sinkhole link routes, from Client::sinkhole_links: which lists apply to which
client identities.
Links belong to the client identity’s owner: you see and manage the links of your own identities (all of them as an Admin), not other users’ links to your shared list.
Implementations§
Source§impl<'a> SinkholeLinks<'a>
impl<'a> SinkholeLinks<'a>
Sourcepub async fn list(
&self,
filter: &SinkholeLinkFilter,
) -> Result<Vec<SinkholeLink>>
pub async fn list( &self, filter: &SinkholeLinkFilter, ) -> Result<Vec<SinkholeLink>>
Links of the caller’s client identities, all at once (Core does not paginate them).
GET /api/v1/sinkhole-links
Sourcepub async fn create(
&self,
client_identity_id: Uuid,
list_id: Uuid,
) -> Result<SinkholeLink>
pub async fn create( &self, client_identity_id: Uuid, list_id: Uuid, ) -> Result<SinkholeLink>
Applies a list to a client identity; Relay starts filtering that client’s queries by it. You must own the identity, and the list must be yours or shared.
POST /api/v1/sinkhole-links
§Errors
ErrorCode::NotFoundif the identity or the list does not exist.ErrorCode::Forbiddenif the identity is not yours, or the list is neither yours nor shared.ErrorCode::Suspendedif the identity or its owner is suspended.ErrorCode::Conflictif the link exists.
Sourcepub async fn delete(
&self,
client_identity_id: Uuid,
list_id: Uuid,
) -> Result<()>
pub async fn delete( &self, client_identity_id: Uuid, list_id: Uuid, ) -> Result<()>
Stops applying a list to a client identity. The identity’s owner or an Admin only, not the list’s owner.
DELETE /api/v1/sinkhole-links/:client_identify_id/:sinkholelist_id
§Errors
ErrorCode::NotFoundif there is no such link.ErrorCode::Forbiddenif the identity is not yours.ErrorCode::Suspendedif the identity or its owner is suspended.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SinkholeLinks<'a>
impl<'a> !UnwindSafe for SinkholeLinks<'a>
impl<'a> Freeze for SinkholeLinks<'a>
impl<'a> Send for SinkholeLinks<'a>
impl<'a> Sync for SinkholeLinks<'a>
impl<'a> Unpin for SinkholeLinks<'a>
impl<'a> UnsafeUnpin for SinkholeLinks<'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
Mutably borrows from an owned value. Read more