Struct crux_platform::Platform
source · pub struct Platform<Ev> { /* private fields */ }Implementations§
source§impl<Ev> Platform<Ev>where
Ev: 'static,
impl<Ev> Platform<Ev>where Ev: 'static,
pub fn new(context: CapabilityContext<PlatformRequest, Ev>) -> Self
pub fn get<F>(&self, callback: F)where F: Fn(PlatformResponse) -> Ev + Send + Sync + 'static,
Trait Implementations§
source§impl<Ef> Capability<Ef> for Platform<Ef>
impl<Ef> Capability<Ef> for Platform<Ef>
type Operation = PlatformRequest
type MappedSelf<MappedEv> = Platform<MappedEv>
fn map_event<F, NewEvent>(&self, f: F) -> Self::MappedSelf<NewEvent>where F: Fn(NewEvent) -> Ef + Send + Sync + Copy + 'static, Ef: 'static, NewEvent: 'static,
Auto Trait Implementations§
impl<Ev> !RefUnwindSafe for Platform<Ev>
impl<Ev> Send for Platform<Ev>
impl<Ev> Sync for Platform<Ev>
impl<Ev> Unpin for Platform<Ev>
impl<Ev> !UnwindSafe for Platform<Ev>
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