pub struct Framework<T: Clone + Send + Sync> { /* private fields */ }
Implementations§
Source§impl<T: Clone + Send + Sync + 'static> Framework<T>
impl<T: Clone + Send + Sync + 'static> Framework<T>
pub fn new( registry: Arc<Registry<T>>, client: Arc<Client>, application_id: Id<ApplicationMarker>, services: Arc<T>, setup_fn: Option<fn(ctx: Context<T>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>>, ) -> Self
pub async fn start(&mut self) -> Result<(), Error>
pub fn enable_task( &mut self, handler: TaskHandler<T>, ) -> Result<(), SendError<SchedulerTaskMessage<T>>>
pub fn disable_task( &mut self, name: String, ) -> Result<(), SendError<SchedulerTaskMessage<T>>>
pub fn sender(&self) -> Sender
pub fn send( &mut self, meta: Metadata, event: Event, ) -> Result<(), SendError<(Metadata, Event)>>
pub async fn shutdown(&mut self)
pub async fn join(&mut self) -> Result<(), Error>
Auto Trait Implementations§
impl<T> Freeze for Framework<T>
impl<T> !RefUnwindSafe for Framework<T>
impl<T> Send for Framework<T>
impl<T> Sync for Framework<T>
impl<T> Unpin for Framework<T>
impl<T> !UnwindSafe for Framework<T>
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