pub struct CaseLoaderHandle { /* private fields */ }Expand description
The loading half of one executor, as a value of its own.
Arc<dyn ErasedExecutor> cannot be coerced to Arc<dyn ErasedCaseLoader>
— the two are unrelated trait objects — so this handle is the bridge. It
holds the executor and exposes exactly one method, which is what makes it
safe to give away: a holder can read a case and has no name for anything
else.
Implementations§
Source§impl CaseLoaderHandle
impl CaseLoaderHandle
Sourcepub fn new(executor: Arc<dyn ErasedExecutor>) -> Self
pub fn new(executor: Arc<dyn ErasedExecutor>) -> Self
The loading half of executor.
Trait Implementations§
Source§impl Clone for CaseLoaderHandle
impl Clone for CaseLoaderHandle
Source§impl Debug for CaseLoaderHandle
impl Debug for CaseLoaderHandle
Source§impl ErasedCaseLoader for CaseLoaderHandle
impl ErasedCaseLoader for CaseLoaderHandle
Source§fn load_case<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_id: &'life2 CaseId,
) -> Pin<Box<dyn Future<Output = Result<Versioned<Option<Value>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load_case<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_id: &'life2 CaseId,
) -> Pin<Box<dyn Future<Output = Result<Versioned<Option<Value>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Loads a case for an account as JSON. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for CaseLoaderHandle
impl !UnwindSafe for CaseLoaderHandle
impl Freeze for CaseLoaderHandle
impl Send for CaseLoaderHandle
impl Sync for CaseLoaderHandle
impl Unpin for CaseLoaderHandle
impl UnsafeUnpin for CaseLoaderHandle
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