Skip to main content

SqlKeyStore

Struct SqlKeyStore 

Source
pub struct SqlKeyStore<T> { /* private fields */ }

Implementations§

Source§

impl<A> SqlKeyStore<A>

Source

pub fn new(conn: A) -> Self

Source§

impl<'a> SqlKeyStore<SqliteConnection>

Source

pub fn new_transactional( conn: &'a mut SqliteConnection, ) -> SqlKeyStore<MutableTransactionConnection<'a>>

Source§

impl<C> SqlKeyStore<C>
where C: ConnectionExt,

Source

pub fn write<const VERSION: u16>( &self, label: &[u8], key: &[u8], value: &[u8], ) -> Result<(), <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source

pub fn append<const VERSION: u16>( &self, label: &[u8], key: &[u8], value: &[u8], ) -> Result<(), <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source

pub fn remove_item<const VERSION: u16>( &self, label: &[u8], key: &[u8], value: &[u8], ) -> Result<(), <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source

pub fn read<const VERSION: u16, V: Entity<VERSION>>( &self, label: &[u8], key: &[u8], ) -> Result<Option<V>, <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source

pub fn read_list<const VERSION: u16, V: Entity<VERSION>>( &self, label: &[u8], key: &[u8], ) -> Result<Vec<V>, <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source

pub fn delete<const VERSION: u16>( &self, label: &[u8], key: &[u8], ) -> Result<(), <Self as StorageProvider<CURRENT_VERSION>>::Error>

Trait Implementations§

Source§

impl<T: Clone> Clone for SqlKeyStore<T>

Source§

fn clone(&self) -> SqlKeyStore<T>

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<C> StorageProvider<CURRENT_VERSION> for SqlKeyStore<C>
where C: ConnectionExt,

Source§

type Error = SqlKeyStoreError

An opaque error returned by all methods on this trait.
Source§

fn queue_proposal<GroupId: GroupId<CURRENT_VERSION>, ProposalRef: ProposalRef<CURRENT_VERSION>, QueuedProposal: QueuedProposal<CURRENT_VERSION>>( &self, group_id: &GroupId, proposal_ref: &ProposalRef, proposal: &QueuedProposal, ) -> Result<(), Self::Error>

Enqueue a proposal. Read more
Source§

fn write_tree<GroupId: GroupId<CURRENT_VERSION>, TreeSync: TreeSync<CURRENT_VERSION>>( &self, group_id: &GroupId, tree: &TreeSync, ) -> Result<(), Self::Error>

Write the TreeSync tree.
Source§

fn write_interim_transcript_hash<GroupId: GroupId<CURRENT_VERSION>, InterimTranscriptHash: InterimTranscriptHash<CURRENT_VERSION>>( &self, group_id: &GroupId, interim_transcript_hash: &InterimTranscriptHash, ) -> Result<(), Self::Error>

Write the interim transcript hash.
Source§

fn write_context<GroupId: GroupId<CURRENT_VERSION>, GroupContext: GroupContext<CURRENT_VERSION>>( &self, group_id: &GroupId, group_context: &GroupContext, ) -> Result<(), Self::Error>

Write the group context.
Source§

fn write_confirmation_tag<GroupId: GroupId<CURRENT_VERSION>, ConfirmationTag: ConfirmationTag<CURRENT_VERSION>>( &self, group_id: &GroupId, confirmation_tag: &ConfirmationTag, ) -> Result<(), Self::Error>

Write the confirmation tag.
Source§

fn write_signature_key_pair<SignaturePublicKey: SignaturePublicKey<CURRENT_VERSION>, SignatureKeyPair: SignatureKeyPair<CURRENT_VERSION>>( &self, public_key: &SignaturePublicKey, signature_key_pair: &SignatureKeyPair, ) -> Result<(), Self::Error>

Store a signature key. Read more
Source§

fn queued_proposal_refs<GroupId: GroupId<CURRENT_VERSION>, ProposalRef: ProposalRef<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Vec<ProposalRef>, Self::Error>

Returns references of all queued proposals for the group with group id group_id, or an empty vector of none are stored.
Source§

fn queued_proposals<GroupId: GroupId<CURRENT_VERSION>, ProposalRef: ProposalRef<CURRENT_VERSION>, QueuedProposal: QueuedProposal<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Vec<(ProposalRef, QueuedProposal)>, Self::Error>

Returns all queued proposals for the group with group id group_id, or an empty vector of none are stored.
Source§

fn tree<GroupId: GroupId<CURRENT_VERSION>, TreeSync: TreeSync<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<TreeSync>, Self::Error>

Returns the TreeSync tree for the group with group id group_id.
Source§

fn group_context<GroupId: GroupId<CURRENT_VERSION>, GroupContext: GroupContext<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<GroupContext>, Self::Error>

Returns the group context for the group with group id group_id.
Source§

fn interim_transcript_hash<GroupId: GroupId<CURRENT_VERSION>, InterimTranscriptHash: InterimTranscriptHash<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<InterimTranscriptHash>, Self::Error>

Returns the interim transcript hash for the group with group id group_id.
Source§

fn confirmation_tag<GroupId: GroupId<CURRENT_VERSION>, ConfirmationTag: ConfirmationTag<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<ConfirmationTag>, Self::Error>

Returns the confirmation tag for the group with group id group_id.
Source§

fn signature_key_pair<SignaturePublicKey: SignaturePublicKey<CURRENT_VERSION>, SignatureKeyPair: SignatureKeyPair<CURRENT_VERSION>>( &self, public_key: &SignaturePublicKey, ) -> Result<Option<SignatureKeyPair>, Self::Error>

Get a signature key based on the public key. Read more
Source§

fn write_key_package<HashReference: HashReference<CURRENT_VERSION>, KeyPackage: KeyPackage<CURRENT_VERSION>>( &self, hash_ref: &HashReference, key_package: &KeyPackage, ) -> Result<(), Self::Error>

Store key packages. Read more
Source§

fn write_psk<PskId: PskId<CURRENT_VERSION>, PskBundle: PskBundle<CURRENT_VERSION>>( &self, _psk_id: &PskId, _psk: &PskBundle, ) -> Result<(), Self::Error>

Store a PSK. Read more
Source§

fn write_encryption_key_pair<EncryptionKey: EncryptionKey<CURRENT_VERSION>, HpkeKeyPair: HpkeKeyPair<CURRENT_VERSION>>( &self, public_key: &EncryptionKey, key_pair: &HpkeKeyPair, ) -> Result<(), Self::Error>

Store an HPKE encryption key pair. This includes the private and public key Read more
Source§

fn key_package<HashReference: HashReference<CURRENT_VERSION>, KeyPackage: KeyPackage<CURRENT_VERSION>>( &self, hash_ref: &HashReference, ) -> Result<Option<KeyPackage>, Self::Error>

Get a key package based on its hash reference.
Source§

fn psk<PskBundle: PskBundle<CURRENT_VERSION>, PskId: PskId<CURRENT_VERSION>>( &self, _psk_id: &PskId, ) -> Result<Option<PskBundle>, Self::Error>

Get a PSK based on the PSK identifier.
Source§

fn encryption_key_pair<HpkeKeyPair: HpkeKeyPair<CURRENT_VERSION>, EncryptionKey: EncryptionKey<CURRENT_VERSION>>( &self, public_key: &EncryptionKey, ) -> Result<Option<HpkeKeyPair>, Self::Error>

Get an HPKE encryption key pair based on the public key. Read more
Source§

fn delete_signature_key_pair<SignaturePublicKey: SignaturePublicKey<CURRENT_VERSION>>( &self, public_key: &SignaturePublicKey, ) -> Result<(), Self::Error>

Delete a signature key pair based on its public key Read more
Source§

fn delete_encryption_key_pair<EncryptionKey: EncryptionKey<CURRENT_VERSION>>( &self, public_key: &EncryptionKey, ) -> Result<(), Self::Error>

Delete an encryption key pair for a public key. Read more
Source§

fn delete_key_package<HashReference: HashReference<CURRENT_VERSION>>( &self, hash_ref: &HashReference, ) -> Result<(), Self::Error>

Delete a key package based on the hash reference. Read more
Source§

fn delete_psk<PskKey: PskId<CURRENT_VERSION>>( &self, _psk_id: &PskKey, ) -> Result<(), Self::Error>

Delete a PSK based on an identifier.
Source§

fn group_state<GroupState: GroupState<CURRENT_VERSION>, GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<GroupState>, Self::Error>

Returns the group state for the group with group id group_id.
Source§

fn write_group_state<GroupState: GroupState<CURRENT_VERSION>, GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, group_state: &GroupState, ) -> Result<(), Self::Error>

Writes the MlsGroupState for group with given id.
Source§

fn delete_group_state<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the MlsGroupState for group with given id.
Source§

fn message_secrets<GroupId: GroupId<CURRENT_VERSION>, MessageSecrets: MessageSecrets<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<MessageSecrets>, Self::Error>

Returns the MessageSecretsStore for the group with the given id.
Source§

fn write_message_secrets<GroupId: GroupId<CURRENT_VERSION>, MessageSecrets: MessageSecrets<CURRENT_VERSION>>( &self, group_id: &GroupId, message_secrets: &MessageSecrets, ) -> Result<(), Self::Error>

Writes the MessageSecretsStore for the group with the given id.
Source§

fn delete_message_secrets<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the MessageSecretsStore for the group with the given id.
Source§

fn resumption_psk_store<GroupId: GroupId<CURRENT_VERSION>, ResumptionPskStore: ResumptionPskStore<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<ResumptionPskStore>, Self::Error>

Returns the ResumptionPskStore for the group with the given id. Read more
Source§

fn write_resumption_psk_store<GroupId: GroupId<CURRENT_VERSION>, ResumptionPskStore: ResumptionPskStore<CURRENT_VERSION>>( &self, group_id: &GroupId, resumption_psk_store: &ResumptionPskStore, ) -> Result<(), Self::Error>

Writes the ResumptionPskStore for the group with the given id.
Source§

fn delete_all_resumption_psk_secrets<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the ResumptionPskStore for the group with the given id.
Source§

fn own_leaf_index<GroupId: GroupId<CURRENT_VERSION>, LeafNodeIndex: LeafNodeIndex<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<LeafNodeIndex>, Self::Error>

Returns the own leaf index inside the group for the group with the given id.
Source§

fn write_own_leaf_index<GroupId: GroupId<CURRENT_VERSION>, LeafNodeIndex: LeafNodeIndex<CURRENT_VERSION>>( &self, group_id: &GroupId, own_leaf_index: &LeafNodeIndex, ) -> Result<(), Self::Error>

Writes the own leaf index inside the group for the group with the given id.
Source§

fn delete_own_leaf_index<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the own leaf index inside the group for the group with the given id.
Source§

fn group_epoch_secrets<GroupId: GroupId<CURRENT_VERSION>, GroupEpochSecrets: GroupEpochSecrets<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<GroupEpochSecrets>, Self::Error>

Returns the GroupEpochSecrets for the group with the given id.
Source§

fn write_group_epoch_secrets<GroupId: GroupId<CURRENT_VERSION>, GroupEpochSecrets: GroupEpochSecrets<CURRENT_VERSION>>( &self, group_id: &GroupId, group_epoch_secrets: &GroupEpochSecrets, ) -> Result<(), Self::Error>

Writes the GroupEpochSecrets for the group with the given id.
Source§

fn delete_group_epoch_secrets<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the GroupEpochSecrets for the group with the given id.
Source§

fn write_encryption_epoch_key_pairs<GroupId: GroupId<CURRENT_VERSION>, EpochKey: EpochKey<CURRENT_VERSION>, HpkeKeyPair: HpkeKeyPair<CURRENT_VERSION>>( &self, group_id: &GroupId, epoch: &EpochKey, leaf_index: u32, key_pairs: &[HpkeKeyPair], ) -> Result<(), Self::Error>

Store a list of HPKE encryption key pairs for a given epoch. This includes the private and public keys.
Source§

fn encryption_epoch_key_pairs<GroupId: GroupId<CURRENT_VERSION>, EpochKey: EpochKey<CURRENT_VERSION>, HpkeKeyPair: HpkeKeyPair<CURRENT_VERSION>>( &self, group_id: &GroupId, epoch: &EpochKey, leaf_index: u32, ) -> Result<Vec<HpkeKeyPair>, Self::Error>

Get a list of HPKE encryption key pairs for a given epoch. This includes the private and public keys.
Source§

fn delete_encryption_epoch_key_pairs<GroupId: GroupId<CURRENT_VERSION>, EpochKey: EpochKey<CURRENT_VERSION>>( &self, group_id: &GroupId, epoch: &EpochKey, leaf_index: u32, ) -> Result<(), Self::Error>

Delete a list of HPKE encryption key pairs for a given epoch. This includes the private and public keys.
Source§

fn clear_proposal_queue<GroupId: GroupId<CURRENT_VERSION>, ProposalRef: ProposalRef<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Clear the proposal queue for the group with the given id.
Source§

fn mls_group_join_config<GroupId: GroupId<CURRENT_VERSION>, MlsGroupJoinConfig: MlsGroupJoinConfig<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<MlsGroupJoinConfig>, Self::Error>

Returns the MlsGroupJoinConfig for the group with given id
Source§

fn write_mls_join_config<GroupId: GroupId<CURRENT_VERSION>, MlsGroupJoinConfig: MlsGroupJoinConfig<CURRENT_VERSION>>( &self, group_id: &GroupId, config: &MlsGroupJoinConfig, ) -> Result<(), Self::Error>

Writes the MlsGroupJoinConfig for the group with given id to storage
Source§

fn own_leaf_nodes<GroupId: GroupId<CURRENT_VERSION>, LeafNode: LeafNode<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Vec<LeafNode>, Self::Error>

Returns the own leaf nodes for the group with given id
Source§

fn append_own_leaf_node<GroupId: GroupId<CURRENT_VERSION>, LeafNode: LeafNode<CURRENT_VERSION>>( &self, group_id: &GroupId, leaf_node: &LeafNode, ) -> Result<(), Self::Error>

Adds an own leaf node for the group with given id to storage
Source§

fn delete_own_leaf_nodes<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes own leaf nodes for the given id from storage
Source§

fn delete_group_config<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the MlsGroupJoinConfig for the given id from storage
Source§

fn delete_tree<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the tree from storage
Source§

fn delete_confirmation_tag<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the confirmation tag from storage
Source§

fn delete_context<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the group context for the group with given id
Source§

fn delete_interim_transcript_hash<GroupId: GroupId<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Deletes the interim transcript hash for the group with given id
Source§

fn remove_proposal<GroupId: GroupId<CURRENT_VERSION>, ProposalRef: ProposalRef<CURRENT_VERSION>>( &self, group_id: &GroupId, proposal_ref: &ProposalRef, ) -> Result<(), Self::Error>

Removes an individual proposal from the proposal queue of the group with the provided id
Source§

fn write_application_export_tree<GroupId: GroupId<CURRENT_VERSION>, ApplicationExportTree: ApplicationExportTree<CURRENT_VERSION>>( &self, group_id: &GroupId, application_export_tree: &ApplicationExportTree, ) -> Result<(), Self::Error>

Write the ApplicationExportTree for the group with the given id.
Source§

fn application_export_tree<GroupId: GroupId<CURRENT_VERSION>, ApplicationExportTree: ApplicationExportTree<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<Option<ApplicationExportTree>, Self::Error>

Get the application export tree for the group with the given id.
Source§

fn delete_application_export_tree<GroupId: GroupId<CURRENT_VERSION>, ApplicationExportTree: ApplicationExportTree<CURRENT_VERSION>>( &self, group_id: &GroupId, ) -> Result<(), Self::Error>

Delete the application export tree for the group with the given id.
§

fn version() -> u16

Get the version of this provider.
Source§

impl<C: ConnectionExt> XmtpMlsStorageProvider for SqlKeyStore<C>

Source§

type Connection = C

An Opaque Database connection type. Can be anything.
Source§

type TxQuery = SqliteConnection

Source§

type DbQuery<'a> = DbConnection<&'a C> where Self::Connection: 'a

Source§

fn db<'a>(&'a self) -> Self::DbQuery<'a>

Source§

fn transaction<T, E, F>(&self, f: F) -> Result<TransactionOutcome<T>, E>
where F: FnOnce(&mut Self::TxQuery) -> Result<TransactionOutcome<T>, E>, E: From<Error> + From<ConnectionError> + Error,

Start a new transaction. Read more
Source§

fn savepoint<T, E, F>(&self, f: F) -> Result<TransactionOutcome<T>, E>
where F: FnOnce(&mut Self::TxQuery) -> Result<TransactionOutcome<T>, E>, E: From<Error> + From<ConnectionError> + Error,

Start a savepoint within a transaction. Read more
Source§

fn read<V: Entity<CURRENT_VERSION>>( &self, label: &[u8], key: &[u8], ) -> Result<Option<V>, SqlKeyStoreError>

Source§

fn read_list<V: Entity<CURRENT_VERSION>>( &self, label: &[u8], key: &[u8], ) -> Result<Vec<V>, <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source§

fn delete( &self, label: &[u8], key: &[u8], ) -> Result<(), <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source§

fn write( &self, label: &[u8], key: &[u8], value: &[u8], ) -> Result<(), <Self as StorageProvider<CURRENT_VERSION>>::Error>

Source§

fn _disable_lint_for_self<'a>(_: Self::DbQuery<'a>)

Auto Trait Implementations§

§

impl<T> Freeze for SqlKeyStore<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for SqlKeyStore<T>
where T: RefUnwindSafe,

§

impl<T> Send for SqlKeyStore<T>
where T: Send,

§

impl<T> Sync for SqlKeyStore<T>
where T: Sync,

§

impl<T> Unpin for SqlKeyStore<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for SqlKeyStore<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for SqlKeyStore<T>
where T: UnwindSafe,

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 ()

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

impl<T, const VERSION: u16> PublicStorageProvider<VERSION> for T
where T: StorageProvider<VERSION>,

§

type PublicError = <T as StorageProvider<VERSION>>::Error

An opaque error returned by all methods on this trait.
§

fn write_tree<GroupId, TreeSync>( &self, group_id: &GroupId, tree: &TreeSync, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, TreeSync: TreeSync<VERSION>,

Write the TreeSync tree.
§

fn write_interim_transcript_hash<GroupId, InterimTranscriptHash>( &self, group_id: &GroupId, interim_transcript_hash: &InterimTranscriptHash, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, InterimTranscriptHash: InterimTranscriptHash<VERSION>,

Write the interim transcript hash.
§

fn write_context<GroupId, GroupContext>( &self, group_id: &GroupId, group_context: &GroupContext, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, GroupContext: GroupContext<VERSION>,

Write the group context.
§

fn write_confirmation_tag<GroupId, ConfirmationTag>( &self, group_id: &GroupId, confirmation_tag: &ConfirmationTag, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, ConfirmationTag: ConfirmationTag<VERSION>,

Write the confirmation tag.
§

fn queue_proposal<GroupId, ProposalRef, QueuedProposal>( &self, group_id: &GroupId, proposal_ref: &ProposalRef, proposal: &QueuedProposal, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, ProposalRef: ProposalRef<VERSION>, QueuedProposal: QueuedProposal<VERSION>,

Enqueue a proposal.
§

fn queued_proposals<GroupId, ProposalRef, QueuedProposal>( &self, group_id: &GroupId, ) -> Result<Vec<(ProposalRef, QueuedProposal)>, <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, ProposalRef: ProposalRef<VERSION>, QueuedProposal: QueuedProposal<VERSION>,

Returns all queued proposals for the group with group id group_id, or an empty vector of none are stored.
§

fn tree<GroupId, TreeSync>( &self, group_id: &GroupId, ) -> Result<Option<TreeSync>, <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, TreeSync: TreeSync<VERSION>,

Returns the TreeSync tree for the group with group id group_id.
§

fn group_context<GroupId, GroupContext>( &self, group_id: &GroupId, ) -> Result<Option<GroupContext>, <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, GroupContext: GroupContext<VERSION>,

Returns the group context for the group with group id group_id.
§

fn interim_transcript_hash<GroupId, InterimTranscriptHash>( &self, group_id: &GroupId, ) -> Result<Option<InterimTranscriptHash>, <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, InterimTranscriptHash: InterimTranscriptHash<VERSION>,

Returns the interim transcript hash for the group with group id group_id.
§

fn confirmation_tag<GroupId, ConfirmationTag>( &self, group_id: &GroupId, ) -> Result<Option<ConfirmationTag>, <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, ConfirmationTag: ConfirmationTag<VERSION>,

Returns the confirmation tag for the group with group id group_id.
§

fn delete_tree<GroupId>( &self, group_id: &GroupId, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>,

Deletes the tree from storage
§

fn delete_confirmation_tag<GroupId>( &self, group_id: &GroupId, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>,

Deletes the confirmation tag from storage
§

fn delete_context<GroupId>( &self, group_id: &GroupId, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>,

Deletes the group context for the group with given id
§

fn delete_interim_transcript_hash<GroupId>( &self, group_id: &GroupId, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>,

Deletes the interim transcript hash for the group with given id
§

fn remove_proposal<GroupId, ProposalRef>( &self, group_id: &GroupId, proposal_ref: &ProposalRef, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, ProposalRef: ProposalRef<VERSION>,

Removes an individual proposal from the proposal queue of the group with the provided id
§

fn clear_proposal_queue<GroupId, ProposalRef>( &self, group_id: &GroupId, ) -> Result<(), <T as PublicStorageProvider<VERSION>>::PublicError>
where GroupId: GroupId<VERSION>, ProposalRef: ProposalRef<VERSION>,

Clear the proposal queue for the group with the given id.
§

fn version() -> u16

Get the version of this provider.
§

impl<P> PublicStorageProvider for P
where P: PublicStorageProvider<openmls::::storage::{impl#1}::{constant#0}>,

§

type Error = <P as PublicStorageProvider<openmls::::storage::{impl#1}::{constant#0}>>::PublicError

An opaque error returned by all methods on this trait. Matches PublicError from openmls_traits::storage::PublicStorageProvider.
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,