pub struct DefaultConversationPluginsFactory { /* private fields */ }Expand description
Default per-conversation plug-in bundle: in-memory MLS storage shared across per-conversation services; reference scoring + steward implementations.
Implementations§
Source§impl DefaultConversationPluginsFactory
impl DefaultConversationPluginsFactory
Sourcepub fn new(
storage: Arc<MemoryDeMlsStorage>,
credentials: Arc<MlsCredentials>,
) -> Self
pub fn new( storage: Arc<MemoryDeMlsStorage>, credentials: Arc<MlsCredentials>, ) -> Self
Build the default factory from an MLS storage handle and the
User-level MlsCredentials. Both are cloned into every
per-conversation MLS service this factory creates.
Trait Implementations§
Source§impl ConversationPluginsFactory for DefaultConversationPluginsFactory
impl ConversationPluginsFactory for DefaultConversationPluginsFactory
type Mls = OpenMlsService<Arc<MemoryDeMlsStorage>>
type Scoring = PeerScoringService<InMemoryPeerScoreStorage>
type StewardList = DeterministicStewardList
Source§fn create_mls(&self, conversation_id: String) -> Result<Self::Mls, MlsError>
fn create_mls(&self, conversation_id: String) -> Result<Self::Mls, MlsError>
Build an MLS service for a brand-new conversation as its sole creator.
Source§fn welcome_mls(
&self,
welcome_bytes: &[u8],
) -> Result<Option<Self::Mls>, MlsError>
fn welcome_mls( &self, welcome_bytes: &[u8], ) -> Result<Option<Self::Mls>, MlsError>
Try to build an MLS service from a serialized MLS welcome.
Returns
Ok(None) when the welcome isn’t for us.Source§fn make_scoring(&self, config: &ScoringConfig) -> Self::Scoring
fn make_scoring(&self, config: &ScoringConfig) -> Self::Scoring
Build a fresh peer-scoring plug-in for a new conversation runner.
Source§fn make_steward_list(
&self,
conversation_id: &[u8],
config: StewardListConfig,
) -> Self::StewardList
fn make_steward_list( &self, conversation_id: &[u8], config: StewardListConfig, ) -> Self::StewardList
Build a fresh steward-list plug-in for a new conversation runner.
Returns an empty plug-in; the lifecycle creator path bootstraps it
via
StewardListPlugin::install_list.Source§fn generate_key_package(&self) -> Result<KeyPackageBytes, MlsError>
fn generate_key_package(&self) -> Result<KeyPackageBytes, MlsError>
Mint a single-use key package. Identity-bound (not
conversation-bound): joiners publish a KP before any conversation
exists, so this method takes no
conversation_id.Auto Trait Implementations§
impl Freeze for DefaultConversationPluginsFactory
impl RefUnwindSafe for DefaultConversationPluginsFactory
impl Send for DefaultConversationPluginsFactory
impl Sync for DefaultConversationPluginsFactory
impl Unpin for DefaultConversationPluginsFactory
impl UnsafeUnpin for DefaultConversationPluginsFactory
impl UnwindSafe for DefaultConversationPluginsFactory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more