core_crypto_ffi

Trait CoreCryptoCallbacks

Source
pub trait CoreCryptoCallbacks:
    Debug
    + Send
    + Sync {
    // Required methods
    fn authorize<'life0, 'async_trait>(
        &'life0 self,
        conversation_id: Vec<u8>,
        client_id: ClientId,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn user_authorize<'life0, 'async_trait>(
        &'life0 self,
        conversation_id: Vec<u8>,
        external_client_id: ClientId,
        existing_clients: Vec<ClientId>,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn client_is_existing_group_user<'life0, 'async_trait>(
        &'life0 self,
        conversation_id: Vec<u8>,
        client_id: ClientId,
        existing_clients: Vec<ClientId>,
        parent_conversation_clients: Option<Vec<ClientId>>,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

This is needed instead of the original trait (core_crypto::CoreCryptoCallbacks) to use the custom type ClientId, that UniFFi can handle.

Required Methods§

Source

fn authorize<'life0, 'async_trait>( &'life0 self, conversation_id: Vec<u8>, client_id: ClientId, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn user_authorize<'life0, 'async_trait>( &'life0 self, conversation_id: Vec<u8>, external_client_id: ClientId, existing_clients: Vec<ClientId>, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn client_is_existing_group_user<'life0, 'async_trait>( &'life0 self, conversation_id: Vec<u8>, client_id: ClientId, existing_clients: Vec<ClientId>, parent_conversation_clients: Option<Vec<ClientId>>, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Trait Implementations§

Source§

impl<T> FfiConverterArc<T> for dyn CoreCryptoCallbacks

Source§

const TYPE_ID_META: MetadataBuffer

Source§

type FfiType = *const c_void

Source§

fn lower(obj: Arc<Self>) -> Self::FfiType

Source§

fn try_lift(v: Self::FfiType) -> Result<Arc<Self>>

Source§

fn write(obj: Arc<Self>, buf: &mut Vec<u8>)

Source§

fn try_read(buf: &mut &[u8]) -> Result<Arc<Self>>

Source§

impl<T> LiftRef<T> for dyn CoreCryptoCallbacks

Implementors§