Skip to main content

SqliteStore

Struct SqliteStore 

Source
pub struct SqliteStore { /* private fields */ }

Implementations§

Source§

impl SqliteStore

Source

pub async fn new(database_url: &str) -> Result<SqliteStore, StoreError>

Source

pub async fn new_for_device( database_url: &str, device_id: i32, ) -> Result<SqliteStore, StoreError>

Source

pub fn device_id(&self) -> i32

Source

pub async fn save_device_data_for_device( &self, device_id: i32, device_data: &Device, ) -> Result<(), StoreError>

Source

pub async fn create_new_device(&self) -> Result<i32, StoreError>

Source

pub async fn device_exists(&self, device_id: i32) -> Result<bool, StoreError>

Source

pub async fn load_device_data_for_device( &self, device_id: i32, ) -> Result<Option<Device>, StoreError>

Source

pub async fn put_identity_for_device( &self, address: &str, key: [u8; 32], device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn delete_identity_for_device( &self, address: &str, device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn load_identity_for_device( &self, address: &str, device_id: i32, ) -> Result<Option<Vec<u8>>, StoreError>

Source

pub async fn get_session_for_device( &self, address: &str, device_id: i32, ) -> Result<Option<Vec<u8>>, StoreError>

Source

pub async fn put_session_for_device( &self, address: &str, session: &[u8], device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn delete_session_for_device( &self, address: &str, device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn put_sender_key_for_device( &self, address: &str, record: &[u8], device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn get_sender_key_for_device( &self, address: &str, device_id: i32, ) -> Result<Option<Vec<u8>>, StoreError>

Source

pub async fn delete_sender_key_for_device( &self, address: &str, device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn get_app_state_sync_key_for_device( &self, key_id: &[u8], device_id: i32, ) -> Result<Option<AppStateSyncKey>, StoreError>

Source

pub async fn set_app_state_sync_key_for_device( &self, key_id: &[u8], key: AppStateSyncKey, device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn get_latest_app_state_sync_key_id_for_device( &self, device_id: i32, ) -> Result<Option<Vec<u8>>, StoreError>

Source

pub async fn get_app_state_version_for_device( &self, name: &str, device_id: i32, ) -> Result<HashState, StoreError>

Source

pub async fn set_app_state_version_for_device( &self, name: &str, state: HashState, device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn put_app_state_mutation_macs_for_device( &self, name: &str, version: u64, mutations: &[AppStateMutationMAC], device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn delete_app_state_mutation_macs_for_device( &self, name: &str, index_macs: &[Vec<u8>], device_id: i32, ) -> Result<(), StoreError>

Source

pub async fn get_app_state_mutation_mac_for_device( &self, name: &str, index_mac: &[u8], device_id: i32, ) -> Result<Option<Vec<u8>>, StoreError>

Trait Implementations§

Source§

impl AppSyncStore for SqliteStore

Source§

fn get_sync_key<'life0, 'life1, 'async_trait>( &'life0 self, key_id: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<Option<AppStateSyncKey>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get an app state sync key by ID.
Source§

fn set_sync_key<'life0, 'life1, 'async_trait>( &'life0 self, key_id: &'life1 [u8], key: AppStateSyncKey, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Set an app state sync key.
Source§

fn get_version<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<HashState, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get the app state version for a collection.
Source§

fn set_version<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, state: HashState, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Set the app state version for a collection.
Source§

fn put_mutation_macs<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, version: u64, mutations: &'life2 [AppStateMutationMAC], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Store mutation MACs for a version.
Source§

fn get_mutation_mac<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, index_mac: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Get a mutation MAC by index.
Source§

fn delete_mutation_macs<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, index_macs: &'life2 [Vec<u8>], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Delete mutation MACs by their index MACs.
Source§

fn get_latest_sync_key_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Get the most recently stored app state sync key ID.
Source§

impl Clone for SqliteStore

Source§

fn clone(&self) -> SqliteStore

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl DeviceStore for SqliteStore

Source§

fn save<'life0, 'life1, 'async_trait>( &'life0 self, device: &'life1 Device, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Save device data.
Source§

fn load<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Device>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Load device data.
Source§

fn exists<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Check if a device exists.
Source§

fn create<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<i32, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Create a new device row and return its generated device_id.
Source§

fn snapshot_db<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, extra_content: Option<&'life2 [u8]>, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Create a snapshot of the database state. The argument name can be used to label the snapshot file. extra_content can be used to save a related binary blob (e.g. the message that caused the failure).
Source§

impl ProtocolStore for SqliteStore

Source§

fn get_skdm_recipients<'life0, 'life1, 'async_trait>( &'life0 self, group_jid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Jid>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get device JIDs that have received SKDM for a group.
Source§

fn add_skdm_recipients<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, group_jid: &'life1 str, device_jids: &'life2 [Jid], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Record devices that have received SKDM for a group.
Source§

fn clear_skdm_recipients<'life0, 'life1, 'async_trait>( &'life0 self, group_jid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Clear SKDM recipients for a group (call when sender key is rotated).
Source§

fn get_lid_mapping<'life0, 'life1, 'async_trait>( &'life0 self, lid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<LidPnMappingEntry>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get a mapping by LID.
Source§

fn get_pn_mapping<'life0, 'life1, 'async_trait>( &'life0 self, phone: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<LidPnMappingEntry>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get a mapping by phone number (returns the most recent LID for that phone).
Source§

fn put_lid_mapping<'life0, 'life1, 'async_trait>( &'life0 self, entry: &'life1 LidPnMappingEntry, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Store or update a LID-PN mapping.
Source§

fn get_all_lid_mappings<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<LidPnMappingEntry>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Get all LID-PN mappings (for cache warm-up).
Source§

fn save_base_key<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, address: &'life1 str, message_id: &'life2 str, base_key: &'life3 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, SqliteStore: 'async_trait,

Save the base key for a session address during retry collision detection.
Source§

fn has_same_base_key<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, address: &'life1 str, message_id: &'life2 str, current_base_key: &'life3 [u8], ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, SqliteStore: 'async_trait,

Check if the current session has the same base key as the saved one.
Source§

fn delete_base_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, address: &'life1 str, message_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Delete a base key entry.
Source§

fn update_device_list<'life0, 'async_trait>( &'life0 self, record: DeviceListRecord, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Update the device list for a user (called after usync responses).
Source§

fn get_devices<'life0, 'life1, 'async_trait>( &'life0 self, user: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceListRecord>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get all known devices for a user.
Source§

fn mark_forget_sender_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, group_jid: &'life1 str, participant: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Mark a participant’s sender key as needing regeneration for a group.
Source§

fn consume_forget_marks<'life0, 'life1, 'async_trait>( &'life0 self, group_jid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get participants that need fresh SKDM (marked for forget). Consumes the marks (deletes them after reading).
Source§

fn get_tc_token<'life0, 'life1, 'async_trait>( &'life0 self, jid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<TcTokenEntry>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get a trusted contact token for a JID (stored under LID).
Source§

fn put_tc_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, jid: &'life1 str, entry: &'life2 TcTokenEntry, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Store or update a trusted contact token for a JID.
Source§

fn delete_tc_token<'life0, 'life1, 'async_trait>( &'life0 self, jid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Delete a trusted contact token for a JID.
Source§

fn get_all_tc_token_jids<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Get all JIDs that have stored tc tokens.
Source§

fn delete_expired_tc_tokens<'life0, 'async_trait>( &'life0 self, cutoff_timestamp: i64, ) -> Pin<Box<dyn Future<Output = Result<u32, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Delete tc tokens with token_timestamp older than cutoff. Returns count deleted.
Source§

fn store_sent_message<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, chat_jid: &'life1 str, message_id: &'life2 str, payload: &'life3 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, SqliteStore: 'async_trait,

Store a sent message’s serialized payload for retry handling. Called after each send_message(); the payload is the protobuf-encoded Message.
Source§

fn take_sent_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, chat_jid: &'life1 str, message_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Retrieve and delete a sent message (atomic take). Returns serialized payload. Called when a retry receipt arrives; consuming prevents double-retry.
Source§

fn delete_expired_sent_messages<'life0, 'async_trait>( &'life0 self, cutoff_timestamp: i64, ) -> Pin<Box<dyn Future<Output = Result<u32, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Delete sent messages older than cutoff (unix timestamp seconds). Returns count deleted.
Source§

impl SignalStore for SqliteStore

Source§

fn put_identity<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, key: [u8; 32], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Store an identity key for a remote address.
Source§

fn load_identity<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Load an identity key for a remote address.
Source§

fn delete_identity<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Delete an identity key.
Source§

fn get_session<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get an encrypted session for an address.
Source§

fn put_session<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, address: &'life1 str, session: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Store an encrypted session.
Source§

fn delete_session<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Delete a session.
Source§

fn store_prekey<'life0, 'life1, 'async_trait>( &'life0 self, id: u32, record: &'life1 [u8], uploaded: bool, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Store a pre-key.
Source§

fn store_prekeys_batch<'life0, 'life1, 'async_trait>( &'life0 self, keys: &'life1 [(u32, Vec<u8>)], uploaded: bool, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Store multiple pre-keys in a single batch operation. Default implementation falls back to individual store_prekey calls.
Source§

fn load_prekey<'life0, 'async_trait>( &'life0 self, id: u32, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Load a pre-key by ID.
Source§

fn remove_prekey<'life0, 'async_trait>( &'life0 self, id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Remove a pre-key.
Source§

fn get_max_prekey_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u32, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Get the maximum pre-key ID currently stored, or 0 if none exist. Used for migration when next_pre_key_id counter is not yet initialized.
Source§

fn store_signed_prekey<'life0, 'life1, 'async_trait>( &'life0 self, id: u32, record: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Store a signed pre-key.
Source§

fn load_signed_prekey<'life0, 'async_trait>( &'life0 self, id: u32, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Load a signed pre-key by ID.
Source§

fn load_all_signed_prekeys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<(u32, Vec<u8>)>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Load all signed pre-keys. Returns (id, record) pairs.
Source§

fn remove_signed_prekey<'life0, 'async_trait>( &'life0 self, id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, SqliteStore: 'async_trait,

Remove a signed pre-key.
Source§

fn put_sender_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, address: &'life1 str, record: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, SqliteStore: 'async_trait,

Store a sender key for group messaging.
Source§

fn get_sender_key<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Get a sender key.
Source§

fn delete_sender_key<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, SqliteStore: 'async_trait,

Delete a sender key.
Source§

fn has_session<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Check if a session exists. Default implementation uses get_session.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AggregateExpressionMethods for T

Source§

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

DISTINCT modifier for aggregate functions Read more
Source§

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

ALL modifier for aggregate functions Read more
Source§

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

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

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

Source§

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

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

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

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

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

Source§

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

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

Source§

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

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> 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> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression

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

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
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<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<T> WindowExpressionMethods for T

Source§

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

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

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

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

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

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

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

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

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

impl<T> Backend for T