pub struct BackendBuilder<CB>where
CB: BackendContextBuilder,{Show 23 fields
pub account_config: Arc<AccountConfig>,
pub ctx_builder: CB,
pub check_up: BackendFeatureSource<CB::Context, dyn CheckUp>,
pub add_folder: BackendFeatureSource<CB::Context, dyn AddFolder>,
pub list_folders: BackendFeatureSource<CB::Context, dyn ListFolders>,
pub expunge_folder: BackendFeatureSource<CB::Context, dyn ExpungeFolder>,
pub purge_folder: BackendFeatureSource<CB::Context, dyn PurgeFolder>,
pub delete_folder: BackendFeatureSource<CB::Context, dyn DeleteFolder>,
pub get_envelope: BackendFeatureSource<CB::Context, dyn GetEnvelope>,
pub list_envelopes: BackendFeatureSource<CB::Context, dyn ListEnvelopes>,
pub thread_envelopes: BackendFeatureSource<CB::Context, dyn ThreadEnvelopes>,
pub watch_envelopes: BackendFeatureSource<CB::Context, dyn WatchEnvelopes>,
pub add_flags: BackendFeatureSource<CB::Context, dyn AddFlags>,
pub set_flags: BackendFeatureSource<CB::Context, dyn SetFlags>,
pub remove_flags: BackendFeatureSource<CB::Context, dyn RemoveFlags>,
pub add_message: BackendFeatureSource<CB::Context, dyn AddMessage>,
pub send_message: BackendFeatureSource<CB::Context, dyn SendMessage>,
pub peek_messages: BackendFeatureSource<CB::Context, dyn PeekMessages>,
pub get_messages: BackendFeatureSource<CB::Context, dyn GetMessages>,
pub copy_messages: BackendFeatureSource<CB::Context, dyn CopyMessages>,
pub move_messages: BackendFeatureSource<CB::Context, dyn MoveMessages>,
pub delete_messages: BackendFeatureSource<CB::Context, dyn DeleteMessages>,
pub remove_messages: BackendFeatureSource<CB::Context, dyn RemoveMessages>,
}
Expand description
The runtime backend builder.
The determination of backend’s features occurs dynamically at runtime, making the utilization of traits and generics potentially less advantageous in this context. This consideration is particularly relevant if the client interface is an interactive shell (To Be Announced).
Furthermore, this design empowers the programmatic management of features during runtime.
Alternatively, users have the option to define their custom
structs and implement the same traits as those implemented by
BackendBuilder
. This approach allows for the creation of bespoke
functionality tailored to specific requirements.
Fields§
§account_config: Arc<AccountConfig>
The account configuration.
ctx_builder: CB
The backend context builder.
check_up: BackendFeatureSource<CB::Context, dyn CheckUp>
The noop backend builder feature.
add_folder: BackendFeatureSource<CB::Context, dyn AddFolder>
The add folder backend builder feature.
list_folders: BackendFeatureSource<CB::Context, dyn ListFolders>
The list folders backend builder feature.
expunge_folder: BackendFeatureSource<CB::Context, dyn ExpungeFolder>
The expunge folder backend builder feature.
purge_folder: BackendFeatureSource<CB::Context, dyn PurgeFolder>
The purge folder backend builder feature.
delete_folder: BackendFeatureSource<CB::Context, dyn DeleteFolder>
The delete folder backend builder feature.
get_envelope: BackendFeatureSource<CB::Context, dyn GetEnvelope>
The get envelope backend builder feature.
list_envelopes: BackendFeatureSource<CB::Context, dyn ListEnvelopes>
The list envelopes backend builder feature.
thread_envelopes: BackendFeatureSource<CB::Context, dyn ThreadEnvelopes>
The thread envelopes backend builder feature.
watch_envelopes: BackendFeatureSource<CB::Context, dyn WatchEnvelopes>
The watch envelopes backend builder feature.
add_flags: BackendFeatureSource<CB::Context, dyn AddFlags>
The add flags backend builder feature.
set_flags: BackendFeatureSource<CB::Context, dyn SetFlags>
The set flags backend builder feature.
remove_flags: BackendFeatureSource<CB::Context, dyn RemoveFlags>
The remove flags backend builder feature.
add_message: BackendFeatureSource<CB::Context, dyn AddMessage>
The add message backend builder feature.
send_message: BackendFeatureSource<CB::Context, dyn SendMessage>
The send message backend builder feature.
peek_messages: BackendFeatureSource<CB::Context, dyn PeekMessages>
The peek messages backend builder feature.
get_messages: BackendFeatureSource<CB::Context, dyn GetMessages>
The get messages backend builder feature.
copy_messages: BackendFeatureSource<CB::Context, dyn CopyMessages>
The copy messages backend builder feature.
move_messages: BackendFeatureSource<CB::Context, dyn MoveMessages>
The move messages backend builder feature.
delete_messages: BackendFeatureSource<CB::Context, dyn DeleteMessages>
The delete messages backend builder feature.
remove_messages: BackendFeatureSource<CB::Context, dyn RemoveMessages>
The remove messages backend builder feature.
Implementations§
Source§impl<CB> BackendBuilder<CB>where
CB: BackendContextBuilder,
impl<CB> BackendBuilder<CB>where
CB: BackendContextBuilder,
pub fn get_check_up(&self) -> Option<BackendFeature<CB::Context, dyn CheckUp>>
Sourcepub fn set_check_up(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn CheckUp>>,
)
pub fn set_check_up( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn CheckUp>>, )
Set the given backend feature.
Sourcepub fn with_check_up(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn CheckUp>>,
) -> Self
pub fn with_check_up( self, f: impl Into<BackendFeatureSource<CB::Context, dyn CheckUp>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_check_up(self) -> Self
pub fn without_check_up(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_check_up(self) -> Self
pub fn with_context_check_up(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_add_folder( &self, ) -> Option<BackendFeature<CB::Context, dyn AddFolder>>
Sourcepub fn set_add_folder(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn AddFolder>>,
)
pub fn set_add_folder( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn AddFolder>>, )
Set the given backend feature.
Sourcepub fn with_add_folder(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn AddFolder>>,
) -> Self
pub fn with_add_folder( self, f: impl Into<BackendFeatureSource<CB::Context, dyn AddFolder>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_add_folder(self) -> Self
pub fn without_add_folder(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_add_folder(self) -> Self
pub fn with_context_add_folder(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_list_folders( &self, ) -> Option<BackendFeature<CB::Context, dyn ListFolders>>
Sourcepub fn set_list_folders(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ListFolders>>,
)
pub fn set_list_folders( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn ListFolders>>, )
Set the given backend feature.
Sourcepub fn with_list_folders(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ListFolders>>,
) -> Self
pub fn with_list_folders( self, f: impl Into<BackendFeatureSource<CB::Context, dyn ListFolders>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_list_folders(self) -> Self
pub fn without_list_folders(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_list_folders(self) -> Self
pub fn with_context_list_folders(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_expunge_folder( &self, ) -> Option<BackendFeature<CB::Context, dyn ExpungeFolder>>
Sourcepub fn set_expunge_folder(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ExpungeFolder>>,
)
pub fn set_expunge_folder( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn ExpungeFolder>>, )
Set the given backend feature.
Sourcepub fn with_expunge_folder(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ExpungeFolder>>,
) -> Self
pub fn with_expunge_folder( self, f: impl Into<BackendFeatureSource<CB::Context, dyn ExpungeFolder>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_expunge_folder(self) -> Self
pub fn without_expunge_folder(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_expunge_folder(self) -> Self
pub fn with_context_expunge_folder(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_purge_folder( &self, ) -> Option<BackendFeature<CB::Context, dyn PurgeFolder>>
Sourcepub fn set_purge_folder(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn PurgeFolder>>,
)
pub fn set_purge_folder( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn PurgeFolder>>, )
Set the given backend feature.
Sourcepub fn with_purge_folder(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn PurgeFolder>>,
) -> Self
pub fn with_purge_folder( self, f: impl Into<BackendFeatureSource<CB::Context, dyn PurgeFolder>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_purge_folder(self) -> Self
pub fn without_purge_folder(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_purge_folder(self) -> Self
pub fn with_context_purge_folder(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_delete_folder( &self, ) -> Option<BackendFeature<CB::Context, dyn DeleteFolder>>
Sourcepub fn set_delete_folder(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteFolder>>,
)
pub fn set_delete_folder( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteFolder>>, )
Set the given backend feature.
Sourcepub fn with_delete_folder(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteFolder>>,
) -> Self
pub fn with_delete_folder( self, f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteFolder>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_delete_folder(self) -> Self
pub fn without_delete_folder(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_delete_folder(self) -> Self
pub fn with_context_delete_folder(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_get_envelope( &self, ) -> Option<BackendFeature<CB::Context, dyn GetEnvelope>>
Sourcepub fn set_get_envelope(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn GetEnvelope>>,
)
pub fn set_get_envelope( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn GetEnvelope>>, )
Set the given backend feature.
Sourcepub fn with_get_envelope(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn GetEnvelope>>,
) -> Self
pub fn with_get_envelope( self, f: impl Into<BackendFeatureSource<CB::Context, dyn GetEnvelope>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_get_envelope(self) -> Self
pub fn without_get_envelope(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_get_envelope(self) -> Self
pub fn with_context_get_envelope(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_list_envelopes( &self, ) -> Option<BackendFeature<CB::Context, dyn ListEnvelopes>>
Sourcepub fn set_list_envelopes(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ListEnvelopes>>,
)
pub fn set_list_envelopes( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn ListEnvelopes>>, )
Set the given backend feature.
Sourcepub fn with_list_envelopes(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ListEnvelopes>>,
) -> Self
pub fn with_list_envelopes( self, f: impl Into<BackendFeatureSource<CB::Context, dyn ListEnvelopes>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_list_envelopes(self) -> Self
pub fn without_list_envelopes(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_list_envelopes(self) -> Self
pub fn with_context_list_envelopes(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_thread_envelopes( &self, ) -> Option<BackendFeature<CB::Context, dyn ThreadEnvelopes>>
Sourcepub fn set_thread_envelopes(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ThreadEnvelopes>>,
)
pub fn set_thread_envelopes( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn ThreadEnvelopes>>, )
Set the given backend feature.
Sourcepub fn with_thread_envelopes(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn ThreadEnvelopes>>,
) -> Self
pub fn with_thread_envelopes( self, f: impl Into<BackendFeatureSource<CB::Context, dyn ThreadEnvelopes>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_thread_envelopes(self) -> Self
pub fn without_thread_envelopes(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_thread_envelopes(self) -> Self
pub fn with_context_thread_envelopes(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_watch_envelopes( &self, ) -> Option<BackendFeature<CB::Context, dyn WatchEnvelopes>>
Sourcepub fn set_watch_envelopes(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn WatchEnvelopes>>,
)
pub fn set_watch_envelopes( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn WatchEnvelopes>>, )
Set the given backend feature.
Sourcepub fn with_watch_envelopes(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn WatchEnvelopes>>,
) -> Self
pub fn with_watch_envelopes( self, f: impl Into<BackendFeatureSource<CB::Context, dyn WatchEnvelopes>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_watch_envelopes(self) -> Self
pub fn without_watch_envelopes(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_watch_envelopes(self) -> Self
pub fn with_context_watch_envelopes(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_add_flags(&self) -> Option<BackendFeature<CB::Context, dyn AddFlags>>
Sourcepub fn set_add_flags(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn AddFlags>>,
)
pub fn set_add_flags( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn AddFlags>>, )
Set the given backend feature.
Sourcepub fn with_add_flags(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn AddFlags>>,
) -> Self
pub fn with_add_flags( self, f: impl Into<BackendFeatureSource<CB::Context, dyn AddFlags>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_add_flags(self) -> Self
pub fn without_add_flags(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_add_flags(self) -> Self
pub fn with_context_add_flags(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_set_flags(&self) -> Option<BackendFeature<CB::Context, dyn SetFlags>>
Sourcepub fn set_set_flags(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn SetFlags>>,
)
pub fn set_set_flags( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn SetFlags>>, )
Set the given backend feature.
Sourcepub fn with_set_flags(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn SetFlags>>,
) -> Self
pub fn with_set_flags( self, f: impl Into<BackendFeatureSource<CB::Context, dyn SetFlags>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_set_flags(self) -> Self
pub fn without_set_flags(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_set_flags(self) -> Self
pub fn with_context_set_flags(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_remove_flags( &self, ) -> Option<BackendFeature<CB::Context, dyn RemoveFlags>>
Sourcepub fn set_remove_flags(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveFlags>>,
)
pub fn set_remove_flags( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveFlags>>, )
Set the given backend feature.
Sourcepub fn with_remove_flags(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveFlags>>,
) -> Self
pub fn with_remove_flags( self, f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveFlags>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_remove_flags(self) -> Self
pub fn without_remove_flags(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_remove_flags(self) -> Self
pub fn with_context_remove_flags(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_add_message( &self, ) -> Option<BackendFeature<CB::Context, dyn AddMessage>>
Sourcepub fn set_add_message(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn AddMessage>>,
)
pub fn set_add_message( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn AddMessage>>, )
Set the given backend feature.
Sourcepub fn with_add_message(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn AddMessage>>,
) -> Self
pub fn with_add_message( self, f: impl Into<BackendFeatureSource<CB::Context, dyn AddMessage>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_add_message(self) -> Self
pub fn without_add_message(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_add_message(self) -> Self
pub fn with_context_add_message(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_send_message( &self, ) -> Option<BackendFeature<CB::Context, dyn SendMessage>>
Sourcepub fn set_send_message(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn SendMessage>>,
)
pub fn set_send_message( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn SendMessage>>, )
Set the given backend feature.
Sourcepub fn with_send_message(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn SendMessage>>,
) -> Self
pub fn with_send_message( self, f: impl Into<BackendFeatureSource<CB::Context, dyn SendMessage>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_send_message(self) -> Self
pub fn without_send_message(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_send_message(self) -> Self
pub fn with_context_send_message(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_peek_messages( &self, ) -> Option<BackendFeature<CB::Context, dyn PeekMessages>>
Sourcepub fn set_peek_messages(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn PeekMessages>>,
)
pub fn set_peek_messages( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn PeekMessages>>, )
Set the given backend feature.
Sourcepub fn with_peek_messages(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn PeekMessages>>,
) -> Self
pub fn with_peek_messages( self, f: impl Into<BackendFeatureSource<CB::Context, dyn PeekMessages>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_peek_messages(self) -> Self
pub fn without_peek_messages(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_peek_messages(self) -> Self
pub fn with_context_peek_messages(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_get_messages( &self, ) -> Option<BackendFeature<CB::Context, dyn GetMessages>>
Sourcepub fn set_get_messages(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn GetMessages>>,
)
pub fn set_get_messages( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn GetMessages>>, )
Set the given backend feature.
Sourcepub fn with_get_messages(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn GetMessages>>,
) -> Self
pub fn with_get_messages( self, f: impl Into<BackendFeatureSource<CB::Context, dyn GetMessages>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_get_messages(self) -> Self
pub fn without_get_messages(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_get_messages(self) -> Self
pub fn with_context_get_messages(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_copy_messages( &self, ) -> Option<BackendFeature<CB::Context, dyn CopyMessages>>
Sourcepub fn set_copy_messages(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn CopyMessages>>,
)
pub fn set_copy_messages( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn CopyMessages>>, )
Set the given backend feature.
Sourcepub fn with_copy_messages(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn CopyMessages>>,
) -> Self
pub fn with_copy_messages( self, f: impl Into<BackendFeatureSource<CB::Context, dyn CopyMessages>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_copy_messages(self) -> Self
pub fn without_copy_messages(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_copy_messages(self) -> Self
pub fn with_context_copy_messages(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_move_messages( &self, ) -> Option<BackendFeature<CB::Context, dyn MoveMessages>>
Sourcepub fn set_move_messages(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn MoveMessages>>,
)
pub fn set_move_messages( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn MoveMessages>>, )
Set the given backend feature.
Sourcepub fn with_move_messages(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn MoveMessages>>,
) -> Self
pub fn with_move_messages( self, f: impl Into<BackendFeatureSource<CB::Context, dyn MoveMessages>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_move_messages(self) -> Self
pub fn without_move_messages(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_move_messages(self) -> Self
pub fn with_context_move_messages(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_delete_messages( &self, ) -> Option<BackendFeature<CB::Context, dyn DeleteMessages>>
Sourcepub fn set_delete_messages(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteMessages>>,
)
pub fn set_delete_messages( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteMessages>>, )
Set the given backend feature.
Sourcepub fn with_delete_messages(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteMessages>>,
) -> Self
pub fn with_delete_messages( self, f: impl Into<BackendFeatureSource<CB::Context, dyn DeleteMessages>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_delete_messages(self) -> Self
pub fn without_delete_messages(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_delete_messages(self) -> Self
pub fn with_context_delete_messages(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
pub fn get_remove_messages( &self, ) -> Option<BackendFeature<CB::Context, dyn RemoveMessages>>
Sourcepub fn set_remove_messages(
&mut self,
f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveMessages>>,
)
pub fn set_remove_messages( &mut self, f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveMessages>>, )
Set the given backend feature.
Sourcepub fn with_remove_messages(
self,
f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveMessages>>,
) -> Self
pub fn with_remove_messages( self, f: impl Into<BackendFeatureSource<CB::Context, dyn RemoveMessages>>, ) -> Self
Set the given backend feature, using the builder pattern.
Sourcepub fn without_remove_messages(self) -> Self
pub fn without_remove_messages(self) -> Self
Disable the given backend feature, using the builder pattern.
Sourcepub fn with_context_remove_messages(self) -> Self
pub fn with_context_remove_messages(self) -> Self
Use the given backend feature from the context builder, using the builder pattern.
Sourcepub fn new(account_config: Arc<AccountConfig>, ctx_builder: CB) -> Self
pub fn new(account_config: Arc<AccountConfig>, ctx_builder: CB) -> Self
Create a new backend builder using the given backend context builder.
All features are taken from the context by default.
Sourcepub fn without_features(self) -> Self
pub fn without_features(self) -> Self
Disable all features for this backend builder.
pub async fn check_up(self) -> AnyResult<()>
pub async fn build(self) -> AnyResult<Backend<CB::Context>>
Trait Implementations§
Source§impl<CB> Clone for BackendBuilder<CB>where
CB: BackendContextBuilder,
impl<CB> Clone for BackendBuilder<CB>where
CB: BackendContextBuilder,
Source§impl<CB> SyncHash for BackendBuilder<CB>where
CB: BackendContextBuilder + SyncHash,
impl<CB> SyncHash for BackendBuilder<CB>where
CB: BackendContextBuilder + SyncHash,
fn sync_hash(&self, state: &mut DefaultHasher)
Auto Trait Implementations§
impl<CB> Freeze for BackendBuilder<CB>where
CB: Freeze,
impl<CB> !RefUnwindSafe for BackendBuilder<CB>
impl<CB> Send for BackendBuilder<CB>
impl<CB> Sync for BackendBuilder<CB>
impl<CB> Unpin for BackendBuilder<CB>where
CB: Unpin,
impl<CB> !UnwindSafe for BackendBuilder<CB>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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