#[repr(C)]pub struct ExtensionContext {
pub state: Arc<Mutex<State>>,
/* private fields */
}Fields§
§state: Arc<Mutex<State>>Implementations§
Source§impl ExtensionContext
impl ExtensionContext
pub fn new( state: Arc<Mutex<State>>, extension_name: &'static str, repository: Repository, ) -> Self
pub async fn is_locked(&self) -> bool
pub async fn add_mixin<Payload, ReturnType: Future<Output = Result<()>>>( &self, _mixin: Mixin<Payload>, _subscription_approver: &'static impl Fn(CallContext<&'static str>) -> ReturnType, ) -> Result<()>
pub async fn emit<Payload>( &self, _mixin: Mixin<Payload>, _payload: Payload, ) -> Result<()>
pub async fn emit_some<Payload>( _mixin: Mixin<Payload>, _payload: Payload, _receivers: &Vec<&'static str>, ) -> Result<()>
pub async fn call<Argument, Return>( &self, call: &'static Call<Argument, Return>, argument: Argument, ) -> Result<Return>
pub fn add_call<Argument, Return, Handler: Fn(CallContext<Argument>) -> CallOutput<Return>>( &self, call: &'static Call<Argument, Return>, handler: &'static Handler, ) -> impl Future<Output = Result<()>> + '_
Auto Trait Implementations§
impl Freeze for ExtensionContext
impl !RefUnwindSafe for ExtensionContext
impl !Send for ExtensionContext
impl !Sync for ExtensionContext
impl Unpin for ExtensionContext
impl !UnwindSafe for ExtensionContext
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