Skip to main content

MlsGroup

Struct MlsGroup 

Source
pub struct MlsGroup<Context> {
    pub group_id: GroupId,
    pub dm_id: Option<String>,
    pub conversation_type: ConversationType,
    pub created_at_ns: i64,
    pub context: Context,
    /* private fields */
}
Expand description

An LibXMTP MlsGroup NOTE: The Eq implementation compares GroupId, so a dm group with the same identity will be different. the Hash implementation hashes the GroupId

Fields§

§group_id: GroupId§dm_id: Option<String>§conversation_type: ConversationType§created_at_ns: i64§context: Context

Implementations§

Source§

impl<Context: XmtpSharedContext> MlsGroup<Context>

Source

pub fn set_notifications( &self, value: NotificationOverride, ) -> Result<(), StorageError>

Set an override after which the task recomputes the desired set.

Source

pub fn notifications_enabled(&self) -> Result<bool, StorageError>

Return the effective local rule for this conversation.

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Represents a group, which can contain anywhere from 1 to MAX_GROUP_SIZE inboxes.

This is a wrapper around OpenMLS’s MlsGroup that handles our application-level configuration and validations.

Source

pub fn new( context: Context, group_id: GroupId, dm_id: Option<String>, conversation_type: ConversationType, created_at_ns: i64, ) -> Self

Source

pub fn new_cached( context: Context, group_id: &GroupId, ) -> Result<(Self, StoredGroup), StorageError>

Creates a new group instance from the database. Validate that the group exists in the DB before constructing the group.

§Returns

Returns the Group and the stored group information as a tuple.

Source

pub async fn all_members_support_proposals( &self, mls_group: &OpenMlsGroup, ) -> Result<bool, GroupError>

Check if all members in the group support the proposal-by-reference flow.

This checks both:

  1. Leaf node capabilities in the MLS group (via check_extension_support)
  2. The latest published key packages for all member installations fetched from the network, since leaf nodes may be stale (they aren’t updated after the first message is sent).

Returns true if all members support proposals, false otherwise.

Source

pub async fn membership_capabilities( &self, ) -> Result<GroupMembershipCapabilities, GroupError>

Snapshot this group’s membership capabilities: the extension types in the group context, plus the extension types each member installation advertises.

This reports raw capability facts rather than answers — callers filter it to whatever question they care about. For the proposal (app-data-dictionary) migration specifically, a caller checks for MlsExtensionType::AppDataDictionary in context_extensions (already migrated?) and in each installation’s supported_extensions (eligible / who is blocking?).

Every installation’s capabilities — the local one included — come from its latest published key package, not its in-group leaf node: a leaf is frozen when the installation joins and is never updated, so it would understate a client that upgraded afterward (the same reason Self::all_members_support_proposals falls back to key packages). An installation whose key package has not been published or fails verification is reported with capabilities_known == false and an empty extension list, so callers can distinguish “unknown” from “advertises nothing”. Transient failures (network, auth, db) surface as an Err rather than masquerading as unknown capabilities.

Source

pub fn proposals_enabled(&self, mls_group: &OpenMlsGroup) -> bool

Check if the group has proposals enabled (proposal-by-reference flow).

Delegates to check_proposals_enabled which detects the standard MLS ExtensionType::AppDataDictionary group-context extension. A migrated group carries the dict via that extension type, making it both the wire-format carrier AND the signal that the proposal flow is in effect.

When proposals are enabled on a group:

  • Add/remove member operations MUST use proposals
  • All members being added MUST advertise AppDataDictionary support in their key-package capabilities
  • Direct commits for membership changes are not allowed
Source

pub fn is_proposals_enabled(&self) -> Result<bool, GroupError>

Like Self::proposals_enabled, but loads the group from storage instead of taking a caller-held OpenMlsGroup. The convenience shape bindings need for a plain “is this group migrated?” read.

Source

pub async fn enable_proposals( &self, options: EnableProposalsOptions, ) -> Result<(), GroupError>

Enable proposals on this group (proposal-by-reference flow).

Runs the bootstrap commit that migrates the group’s state out of legacy GMM-style extensions and into the standard MLS AppDataDictionary extension. After bootstrap completes the dictionary is the sole source of truth for the metadata attributes that previously lived in the legacy extensions. Once enabled:

  • All add/remove member operations will use proposals
  • All members being added must advertise AppDataDictionary support in their key-package capabilities
  • This cannot be disabled once set
§Options

See EnableProposalsOptions for the two knobs:

  • force: skip the pre-flight key-package capability check. Use when the version floor guarantees proposal support.
  • min_version: override the MIN_SUPPORTED_PROTOCOL_VERSION floor written into the migrated group. Defaults to xmtp_configuration::PROPOSALS_MIN_PROTOCOL_VERSION — the release where proposals support first ships.
§Prerequisites

Before calling this method with force = false, ensure all existing members support proposals by calling all_members_support_proposals().

§Errors

Returns an error if:

  • force = false and not all existing members support proposals
  • min_version is set to an invalid semver string
  • min_version is outside the allowed bounds: above the caller’s own pkg_version, or — in non-test builds — below xmtp_configuration::PROPOSALS_MIN_PROTOCOL_VERSION
  • The group context extension update fails
Source

pub fn validate_key_packages_support_proposals( &self, key_packages: &[KeyPackage], ) -> Result<(), GroupError>

Validate that key packages support the AppData dictionary group-context extension. A leaf that advertises ExtensionType::AppDataDictionary in its standard MLS Capabilities can join a migrated group and receive standalone AppDataUpdate proposals.

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn add_members_by_identity( &self, account_identifiers: &[Identifier], ) -> Result<UpdateGroupMembershipResult, GroupError>

Add members to the group by account address

If any existing members have new installations that have not been added or removed, the group membership will be updated to include those changes as well.

§Returns
  • Ok(UpdateGroupMembershipResult): Contains details about the membership changes, including:
    • added_members: list of added installations
    • removed_members: A list of installations that were removed.
    • members_with_errors: A list of members that encountered errors during the update.
  • Err(GroupError): If the operation fails due to an error.
Source

pub async fn add_members<S: AsIdRef>( &self, inbox_ids: impl AsRef<[S]>, ) -> Result<UpdateGroupMembershipResult, GroupError>

Source

pub async fn remove_members_by_identity( &self, account_addresses_to_remove: &[Identifier], ) -> Result<(), GroupError>

Removes members from the group by their account addresses.

§Arguments
  • client - The XMTP client.
  • account_addresses_to_remove - A vector of account addresses to remove from the group.
§Returns

A Result indicating success or failure of the operation.

Source

pub async fn remove_members( &self, inbox_ids: &[InboxIdRef<'_>], ) -> Result<(), GroupError>

Removes members from the group by their inbox IDs.

§Arguments
  • client - The XMTP client.
  • inbox_ids - A vector of inbox IDs to remove from the group.
§Returns

A Result indicating success or failure of the operation.

Source

pub async fn remove_members_pending_removal(&self) -> Result<(), GroupError>

Removes all members from the group who are currently in the pending removal list.

Only admins and super admins can call this function. Validates permissions, filters out invalid removal requests and performs batch removal of valid pending members.

§Returns
  • Ok(()) - All valid pending members were successfully removed
  • Err(GroupError) - Failed to retrieve metadata, validate permissions or execute removals
Source

pub async fn cleanup_pending_removal_list(&self) -> Result<(), GroupError>

Removes members from the pending removal list who are no longer in the group.

Iterates through all members in the pending removal list, checking each one to see if they’re still in the group. If a member is no longer in the group, they are removed from the pending list. The pending list is refreshed after each removal to ensure we’re working with the most current data.

§Returns
  • Ok(()) - Successfully processed all pending removal members
  • Err(GroupError) - Failed to retrieve data or update the pending list
Source

pub async fn leave_group(&self) -> Result<(), GroupError>

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn send_message( &self, message: &[u8], opts: SendMessageOpts, ) -> Result<Vec<u8>, GroupError>

Send a message on this users XMTP Client.

Source

pub async fn publish_messages(&self) -> Result<(), GroupError>

Publish all unpublished messages. This happens by calling sync_until_last_intent_resolved which publishes all pending intents and reads them back from the network.

Source

pub async fn update_installations(&self) -> Result<(), GroupError>

Checks the network to see if any group members have identity updates that would cause installations to be added or removed from the group.

If so, adds/removes those group members

Source

pub fn send_message_optimistic( &self, message: &[u8], opts: SendMessageOpts, ) -> Result<Vec<u8>, GroupError>

Send a message, optimistically returning the ID of the message before the result of a message publish.

Source

pub fn prepare_message_for_later_publish( &self, message: &[u8], should_push: bool, idempotency_key: Option<String>, ) -> Result<Vec<u8>, GroupError>

Prepare a message for later publishing.

Stores the message locally with Unpublished delivery status but does NOT create an intent to publish. Use publish_stored_message to publish later.

§Arguments
  • message - The message content bytes
  • should_push - Whether to send a push notification when publishing
  • idempotency_key - Optional caller-supplied key the message id is derived from. Defaults to a random key when None.

Returns the message ID.

Source

pub async fn publish_stored_message( &self, message_id: &[u8], ) -> Result<(), GroupError>

Publish a previously stored message by ID.

Creates an intent for the message and publishes it to the network. Uses the should_push value that was stored with the message. This is a no-op if the message is already published.

Returns an error if the message is not found.

Source

pub fn delete_message(&self, message_id: Vec<u8>) -> Result<Vec<u8>, GroupError>

Delete a message by its ID. Returns the ID of the deletion message.

Only the original sender or a super admin can delete a message.

§Wire Protocol

The DeleteMessage protobuf encodes message_id as a hex-encoded string for wire transmission, while the database stores message IDs as raw bytes. This function handles the conversion: it accepts raw bytes, hex-encodes them for the wire protocol, and when processing incoming deletions (in process_delete_message), the hex string is decoded back to bytes for database lookups.

§Arguments
  • message_id - The message ID as bytes
§Returns

The ID of the deletion message

Source

pub fn find_messages( &self, args: &MsgQueryArgs, ) -> Result<Vec<StoredGroupMessage>, GroupError>

Query the database for stored messages. Optionally filtered by time, kind, delivery_status and limit

Source

pub fn count_messages(&self, args: &MsgQueryArgs) -> Result<i64, GroupError>

Count the number of stored messages matching the given criteria

Source

pub fn find_messages_with_reactions( &self, args: &MsgQueryArgs, ) -> Result<Vec<StoredGroupMessageWithReactions>, GroupError>

Query the database for stored messages. Optionally filtered by time, kind, delivery_status and limit

Source

pub fn find_enriched_messages( &self, args: &MsgQueryArgs, ) -> Result<Vec<DecodedMessage>, EnrichMessageError>

Query for enriched messages (with reactions, replies, and deletion status)

Source

pub fn get_last_read_times( &self, ) -> Result<LatestMessageTimeBySender, GroupError>

Source

pub fn load(&self) -> Result<StoredGroup, StorageError>

Load the group reference stored in the local database

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn update_group_name( &self, group_name: String, ) -> Result<(), GroupError>

Updates the name of the group. Will error if the user does not have the appropriate permissions to perform these updates.

Source

pub async fn update_app_data( &self, app_data: String, expected_app_data: Option<String>, ) -> Result<(), GroupError>

Set the group’s opaque app_data slot.

expected_app_data is an optional compare-and-swap guard. When Some, the update is abandoned with GroupError::AppDataSuperseded unless the committed value still equals it — including when another member’s commit wins the epoch race after this intent was published. Callers reconciling structured state should pass the value they merged against, so a concurrent write is reported rather than overwritten.

None keeps the historical last-writer-wins behavior: whatever landed in the meantime is overwritten.

Source

pub async fn update_group_min_version( &self, version: &str, ) -> Result<(), GroupError>

Updates min version of the group to match the given version.

§Arguments
  • version - The libxmtp version to update the group min version to. This is a semver-formatted string matching the Cargo.toml in the libxmtp dependency, and does not match mobile or web release versions. Comparison is done via the semver crate’s Ord impl, so pre-release identifiers (e.g. "1.0.0-rc.1") sort BEFORE the corresponding release ("1.0.0") per semver 2.0 §11. Build metadata (+...) parses but is included in ordering by the semver crate — avoid passing it unless you understand the total-ordering implication.
§Returns

A Result indicating success or failure of the operation.

Source

pub async fn update_commit_log_signer( &self, commit_log_signer: Secret, ) -> Result<(), GroupError>

Updates the commit log signer of the group. Will error if the user does not have the appropriate permissions to perform these updates.

Source

pub async fn update_permission_policy( &self, permission_update_type: PermissionUpdateType, permission_policy: PermissionPolicyOption, metadata_field: Option<MetadataField>, ) -> Result<(), GroupError>

Updates the permission policy of the group. This requires super admin permissions.

Source

pub fn group_name(&self) -> Result<String, GroupError>

Retrieves the group name from the group’s mutable metadata extension.

Source

pub fn app_data(&self) -> Result<String, GroupError>

Retrieves the app_data field from the group’s mutable metadata extension

Source

pub async fn update_group_description( &self, group_description: String, ) -> Result<(), GroupError>

Updates the description of the group.

Source

pub fn group_description(&self) -> Result<String, GroupError>

Source

pub async fn update_group_image_url_square( &self, group_image_url_square: String, ) -> Result<(), GroupError>

Updates the image URL (square) of the group.

Source

pub fn group_image_url_square(&self) -> Result<String, GroupError>

Retrieves the image URL (square) of the group from the group’s mutable metadata extension.

Source

pub async fn update_conversation_message_disappearing_settings( &self, settings: MessageDisappearingSettings, ) -> Result<(), GroupError>

Source

pub async fn remove_conversation_message_disappearing_settings( &self, ) -> Result<(), GroupError>

Source

pub fn paused_for_version(&self) -> Result<Option<String>, GroupError>

If group is not paused, will return None, otherwise will return the version that the group is paused for

Source

pub fn conversation_message_disappearing_settings( &self, ) -> Result<MessageDisappearingSettings, GroupError>

Source

pub fn conversation_message_disappearing_settings_from_extensions( mutable_metadata: &GroupMutableMetadata, ) -> Result<MessageDisappearingSettings, GroupError>

Source

pub fn pending_remove_list(&self) -> Result<Vec<String>, GroupError>

Source

pub fn is_in_pending_remove(&self, inbox_id: &str) -> Result<bool, GroupError>

Checks if the given inbox ID is the pending-remove list of the group at the most recently synced epoch.

Source

pub fn admin_list(&self) -> Result<Vec<String>, GroupError>

Retrieves the admin list of the group from the group’s mutable metadata extension.

Element order: on migrated groups the dict-backed TlsSet<InboxId> is iterated in sorted-by-raw-bytes order. On unmigrated groups the legacy GroupMutableMetadata.admin_list is returned in its stored (insertion) order. Both contracts pre-date this refactor; preserving each side avoids surprising binding consumers that rely on the pre-migration order.

Source

pub fn super_admin_list(&self) -> Result<Vec<String>, GroupError>

Retrieves the super admin list of the group from the group’s mutable metadata extension.

Same ordering contract as Self::admin_list.

Source

pub fn is_admin(&self, inbox_id: String) -> Result<bool, GroupError>

Checks if the given inbox ID is an admin of the group at the most recently synced epoch.

Source

pub fn is_super_admin(&self, inbox_id: String) -> Result<bool, GroupError>

Checks if the given inbox ID is a super admin of the group at the most recently synced epoch.

Source

pub fn is_super_admin_without_lock( &self, mls_group: &OpenMlsGroup, inbox_id: String, ) -> Result<bool, GroupMutableMetadataError>

Checks if the given inbox ID is a super admin of the group at the most recently synced epoch

Source

pub async fn conversation_type(&self) -> Result<ConversationType, GroupError>

Retrieves the conversation type of the group from the group’s metadata extension.

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn update_admin_list( &self, action_type: UpdateAdminListType, inbox_id: String, ) -> Result<(), GroupError>

Updates the admin list of the group and syncs the changes to the network.

Source

pub fn added_by_inbox_id(&self) -> Result<String, GroupError>

Find the inbox_id of the group member who added the member to the group

Source

pub fn consent_state(&self) -> Result<ConsentState, GroupError>

Find the consent_state of the group

Source

pub async fn epoch(&self) -> Result<u64, GroupError>

Get the current epoch number of the group.

Source

pub async fn cursor(&self) -> Result<Cursor, GroupError>

Source

pub async fn local_commit_log(&self) -> Result<Vec<LocalCommitLog>, GroupError>

Source

pub async fn remote_commit_log( &self, ) -> Result<Vec<RemoteCommitLog>, GroupError>

Source

pub async fn debug_info(&self) -> Result<ConversationDebugInfo, GroupError>

Source

pub async fn key_update(&self) -> Result<(), GroupError>

Update this installation’s leaf key in the group by creating a key update commit

Source

pub fn is_active(&self) -> Result<bool, GroupError>

Checks if the current user is active in the group.

If the current user has been kicked out of the group, is_active will return false

Source

pub fn membership_state(&self) -> Result<GroupMembershipState, GroupError>

Returns the membership state of the current user in this group.

Source

pub async fn metadata(&self) -> Result<GroupMetadata, GroupError>

Get the GroupMetadata of the group.

On migrated groups the legacy immutable-metadata extension has been removed; synthesize from dict (CONVERSATION_TYPE, CREATOR_INBOX_ID, DM_MEMBERS, ONESHOT_MESSAGE). On unmigrated groups, the legacy extension is authoritative.

Migrated-but-no-seeds is treated as a hard error rather than falling through to the legacy extension — the bootstrap commit strips the legacy GroupContextExtension, so falling through would surface an unrelated MissingExtension from the legacy path. Returning MissingExtension directly here keeps the failure shape callers already handle while making the “incomplete migration” condition explicit at the originating site.

Source

pub fn mutable_metadata(&self) -> Result<GroupMutableMetadata, GroupError>

Get the GroupMutableMetadata of the group.

Post-migration (dict contains COMPONENT_REGISTRY — see [self::app_data::is_migrated_group]) the legacy GMM extension is gone; we start with an empty base and merge_app_data_into_mutable_metadata populates every field from the AppData dict. Pre-migration we read the legacy GMM extension authoritatively. The overlay helper itself also checks the migration marker (defense in depth), so a stray dict entry on a pre-bootstrap group can’t silently shadow legacy values.

Intentionally distinct from proposals_enabled: a group can have proposals_enabled == true but not yet have completed its bootstrap commit, during which window the legacy GMM is still authoritative.

Source

pub fn permissions(&self) -> Result<GroupMutablePermissions, GroupError>

Source

pub fn disappearing_settings( &self, ) -> Result<Option<MessageDisappearingSettings>, GroupError>

Fetches the message disappearing settings for a given group ID.

Returns Some(MessageDisappearingSettings) if the group exists and has valid settings, None if the group or settings are missing, or Err(ClientError) on a database error.

Source

pub fn find_duplicate_dms(&self) -> Result<Vec<MlsGroup<Context>>, ClientError>

Find all the duplicate dms for this group

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn members(&self) -> Result<Vec<GroupMember>, GroupError>

Load the member list for the group from the DB, merging together multiple installations into a single entry

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn maybe_update_installations( &self, update_interval_ns: Option<i64>, ) -> Result<(), GroupError>

Source

pub fn hmac_keys( &self, epoch_delta_range: RangeInclusive<i64>, ) -> Result<Vec<HmacKey>, StorageError>

Provides hmac keys for a range of epochs around current epoch group.hmac_keys(-1..=1)`` will provide 3 keys consisting of last epoch, current epoch, and next epoch group.hmac_keys(0..=0) will provide 1 key, consisting of only the current epoch

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn receive(&self) -> Result<ProcessSummary, GroupError>

Wait for a fixed network prefix. The summary is local history, not proof of completion.

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext,

Source

pub async fn sync(&self) -> Result<SyncSummary, GroupError>

Source

pub async fn sync_with_conn(&self) -> Result<SyncSummary, SyncSummary>

Sync from the network with the ‘conn’ (local database). must return a summary of all messages synced, whether they were successful or not.

Source§

impl<Context> MlsGroup<Context>
where Context: XmtpSharedContext + 'static,

Source

pub async fn process_streamed_group_message( &self, envelope_bytes: Vec<u8>, ) -> Result<Vec<StoredGroupMessage>, SubscribeError>

Use a push envelope only as a target for ordered receipt and processing.

Source

pub async fn stream<'a>( &'a self, ) -> Result<impl Stream<Item = Result<StoredGroupMessage, SubscribeError>> + use<'a, Context>, SubscribeError>
where Context::ApiClient: XmtpMlsStreams + 'a,

Source

pub async fn stream_owned( &self, ) -> Result<impl Stream<Item = Result<StoredGroupMessage, SubscribeError>> + 'static, SubscribeError>
where Context: 'static, Context::ApiClient: XmtpMlsStreams + 'static, Context::Db: 'static,

create a stream that is not attached to any lifetime

Source

pub fn stream_with_callback( context: Context, group_id: GroupId, callback: impl FnMut(Result<StoredGroupMessage, SubscribeError>) + MaybeSend + 'static, on_close: impl FnOnce() + MaybeSend + 'static, ) -> impl StreamHandle<StreamOutput = Result<(), SubscribeError>>
where Context: 'static, Context::ApiClient: XmtpMlsStreams + 'static,

Trait Implementations§

Source§

impl<Context: XmtpSharedContext> Clone for MlsGroup<Context>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Context> Debug for MlsGroup<Context>
where Context: XmtpSharedContext,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<Context: Clone> From<MlsGroup<&Context>> for MlsGroup<Context>

Source§

fn from(group: MlsGroup<&Context>) -> MlsGroup<Context>

Converts to this type from the input type.
Source§

impl<C> Hash for MlsGroup<C>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<C> PartialEq for MlsGroup<C>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<C> Eq for MlsGroup<C>

Auto Trait Implementations§

§

impl<Context> Freeze for MlsGroup<Context>
where Context: Freeze,

§

impl<Context> !RefUnwindSafe for MlsGroup<Context>

§

impl<Context> Send for MlsGroup<Context>
where Context: Send,

§

impl<Context> Sync for MlsGroup<Context>
where Context: Sync,

§

impl<Context> Unpin for MlsGroup<Context>
where Context: Unpin,

§

impl<Context> UnsafeUnpin for MlsGroup<Context>
where Context: UnsafeUnpin,

§

impl<Context> !UnwindSafe for MlsGroup<Context>

Blanket Implementations§

§

impl<T> AggregateExpressionMethods for T

§

fn aggregate_distinct(self) -> Self::Output
where Self: DistinctDsl,

DISTINCT modifier for aggregate functions Read more
§

fn aggregate_all(self) -> Self::Output
where Self: AllDsl,

ALL modifier for aggregate functions Read more
§

fn aggregate_filter<P>(self, f: P) -> Self::Output
where P: AsExpression<Bool>, Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,

Add an aggregate function filter Read more
§

fn aggregate_order<O>(self, o: O) -> Self::Output
where Self: OrderAggregateDsl<O>,

Add an aggregate function order Read more
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

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

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> IntoSql for T

§

fn into_sql<T>(self) -> Self::Expression
where Self: Sized + AsExpression<T>, T: SqlType + TypedExpressionType,

Convert self to an expression for Diesel’s query builder. Read more
§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<D> OwoColorize for D

§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either [OwoColorize::fg] or a color-specific method, such as [OwoColorize::green], Read more
§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either [OwoColorize::bg] or a color-specific method, such as [OwoColorize::on_yellow], Read more
§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WindowExpressionMethods for T

§

fn over(self) -> Self::Output
where Self: OverDsl,

Turn a function call into a window function call Read more
§

fn window_filter<P>(self, f: P) -> Self::Output
where P: AsExpression<Bool>, Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,

Add a filter to the current window function Read more
§

fn partition_by<E>(self, expr: E) -> Self::Output
where Self: PartitionByDsl<E>,

Add a partition clause to the current window function Read more
§

fn window_order<E>(self, expr: E) -> Self::Output
where Self: OrderWindowDsl<E>,

Add a order clause to the current window function Read more
§

fn frame_by<E>(self, expr: E) -> Self::Output
where Self: FrameDsl<E>,

Add a frame clause to the current window function Read more
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSync for T
where T: Sync + ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,