Struct gloo_worker::oneshot::OneshotSpawner
source · pub struct OneshotSpawner<N, CODEC = Bincode>where
N: Oneshot + 'static,
CODEC: Codec,{ /* private fields */ }
Expand description
A spawner to create oneshot workers.
Implementations§
source§impl<N, CODEC> OneshotSpawner<N, CODEC>where
N: Oneshot + 'static,
CODEC: Codec,
impl<N, CODEC> OneshotSpawner<N, CODEC>where N: Oneshot + 'static, CODEC: Codec,
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a OneshotSpawner.
sourcepub const fn encoding<C>(&self) -> OneshotSpawner<N, C>where
C: Codec,
pub const fn encoding<C>(&self) -> OneshotSpawner<N, C>where C: Codec,
Sets a new message encoding.
sourcepub fn spawn(self, path: &str) -> OneshotBridge<N>where
N::Input: Serialize + for<'de> Deserialize<'de>,
N::Output: Serialize + for<'de> Deserialize<'de>,
pub fn spawn(self, path: &str) -> OneshotBridge<N>where N::Input: Serialize + for<'de> Deserialize<'de>, N::Output: Serialize + for<'de> Deserialize<'de>,
Spawns an Oneshot Worker.
sourcepub fn spawn_with_loader(self, loader_path: &str) -> OneshotBridge<N>where
N::Input: Serialize + for<'de> Deserialize<'de>,
N::Output: Serialize + for<'de> Deserialize<'de>,
pub fn spawn_with_loader(self, loader_path: &str) -> OneshotBridge<N>where N::Input: Serialize + for<'de> Deserialize<'de>, N::Output: Serialize + for<'de> Deserialize<'de>,
Spawns an Oneshot Worker with a loader shim script.
Trait Implementations§
Auto Trait Implementations§
impl<N, CODEC = Bincode> !RefUnwindSafe for OneshotSpawner<N, CODEC>
impl<N, CODEC = Bincode> !Send for OneshotSpawner<N, CODEC>
impl<N, CODEC = Bincode> !Sync for OneshotSpawner<N, CODEC>
impl<N, CODEC> Unpin for OneshotSpawner<N, CODEC>where CODEC: Unpin,
impl<N, CODEC = Bincode> !UnwindSafe for OneshotSpawner<N, CODEC>
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