pub struct InvitationMethods { /* private fields */ }Expand description
Methods for invitation discovery and balance lookups.
get_invitations fetches inviters then batches circles_getInvitationBalance
with bounded concurrency to avoid hammering the RPC.
Implementations§
Source§impl InvitationMethods
impl InvitationMethods
pub fn new(client: RpcClient) -> Self
Sourcepub async fn get_invitation_origin(
&self,
address: Address,
) -> Result<Option<InvitationOriginResponse>>
pub async fn get_invitation_origin( &self, address: Address, ) -> Result<Option<InvitationOriginResponse>>
circles_getInvitationOrigin — reconstruct how an avatar joined Circles.
Sourcepub async fn get_invited_by(&self, address: Address) -> Result<Option<Address>>
pub async fn get_invited_by(&self, address: Address) -> Result<Option<Address>>
TS parity helper: return only the direct inviter address when present.
Sourcepub async fn get_all_invitations(
&self,
address: Address,
minimum_balance: Option<String>,
) -> Result<AllInvitationsResponse>
pub async fn get_all_invitations( &self, address: Address, minimum_balance: Option<String>, ) -> Result<AllInvitationsResponse>
circles_getAllInvitations — return trust, escrow, and at-scale invitations.
Sourcepub async fn get_invitations(
&self,
invitee: Address,
) -> Result<Vec<InvitationRow>>
pub async fn get_invitations( &self, invitee: Address, ) -> Result<Vec<InvitationRow>>
circles_getInvitations — batches balance lookups concurrently per invitee.
Sourcepub async fn get_invitations_from(
&self,
address: Address,
accepted: bool,
) -> Result<InvitationsFromResponse>
pub async fn get_invitations_from( &self, address: Address, accepted: bool, ) -> Result<InvitationsFromResponse>
circles_getInvitationsFrom — accepted or pending invitees for an inviter.
Trait Implementations§
Source§impl Clone for InvitationMethods
impl Clone for InvitationMethods
Source§fn clone(&self) -> InvitationMethods
fn clone(&self) -> InvitationMethods
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InvitationMethods
impl !RefUnwindSafe for InvitationMethods
impl Send for InvitationMethods
impl Sync for InvitationMethods
impl Unpin for InvitationMethods
impl UnsafeUnpin for InvitationMethods
impl !UnwindSafe for InvitationMethods
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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