Skip to main content

Service

Struct Service 

Source
pub struct Service<T>
where T: XrpcClient + Send + Sync,
{ /* private fields */ }
Available on crate feature namespace-chatbsky only.

Implementations§

Source§

impl<T> Service<T>
where T: XrpcClient + Send + Sync,

Source

pub async fn add_members(&self, input: Input) -> Result<Output, Error>

Adds members to a group. The members are added in ‘request’ status, so they have to accept it. This creates convo memberships.

Source

pub async fn approve_join_request(&self, input: Input) -> Result<Output, Error>

Approves a request to join a group (via join link) the user owns. Action taken by the group owner.

Source

pub async fn create_group(&self, input: Input) -> Result<Output, Error>

Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn’t idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create ‘request’ membership for all members, except the owner who is ‘accepted’.

Creates a join link for the group convo.

Disables the active join link for the group convo.

Source

pub async fn edit_group(&self, input: Input) -> Result<Output, Error>

Edits group settings.

Edits the existing join link settings for the group convo.

Re-enables a previously disabled join link for the group convo.

Get public information about groups from join links. The output array matches the input codes one-to-one by position (and each view also carries its ‘code’). Disabled codes return a disabledJoinLinkPreviewView, and codes that do not map to a previewable link return an invalidJoinLinkPreviewView.

Source

pub async fn list_join_requests( &self, params: Parameters, ) -> Result<Output, Error>

Lists a page of request to join a group (via join link) the user owns. Shows the data from the owner’s point of view.

Source

pub async fn list_mutual_groups( &self, params: Parameters, ) -> Result<Output, Error>

Returns a page of group conversations that both the requester and the specified actor are members of.

Source

pub async fn reject_join_request(&self, input: Input) -> Result<Output, Error>

Rejects a request to join a group (via join link) the user owns. Action taken by the group owner.

Source

pub async fn remove_members(&self, input: Input) -> Result<Output, Error>

Removes members from a group. This deletes convo memberships, doesn’t just set a status.

Source

pub async fn request_join(&self, input: Input) -> Result<Output, Error>

Sends a request to join a group (via join link) to the group owner. Action taken by the prospective group member.

Source

pub async fn update_join_requests_read( &self, input: Input, ) -> Result<Output, Error>

Marks all join requests as read for the group owner.

Source

pub async fn withdraw_join_request(&self, input: Input) -> Result<Output, Error>

Withdraws a pending request to join a group. Action taken by the prospective member who originally requested to join.

Auto Trait Implementations§

§

impl<T> Freeze for Service<T>
where Arc<T>: Freeze, PhantomData<T>: Freeze,

§

impl<T> RefUnwindSafe for Service<T>

§

impl<T> Send for Service<T>
where Arc<T>: Send, PhantomData<T>: Send,

§

impl<T> Sync for Service<T>
where Arc<T>: Sync, PhantomData<T>: Sync,

§

impl<T> Unpin for Service<T>
where Arc<T>: Unpin, PhantomData<T>: Unpin,

§

impl<T> UnsafeUnpin for Service<T>

§

impl<T> UnwindSafe for Service<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, C> Cacheable<C> for T

Source§

fn cached(self, cache: C) -> Cached<T, C>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Throttleable<P> for T
where P: Default,

Source§

fn throttled(self) -> Throttled<T, P>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.