pub struct Sidecar { /* private fields */ }Available on neither
target_family=wasm nor iOS.Implementations§
Source§impl Sidecar
impl Sidecar
pub fn start(script: &Script<'_>) -> Result<Self, SidecarError>
pub fn send(&mut self, request: &impl Serialize) -> Result<(), SidecarError>
Sourcepub fn receive<R: DeserializeOwned>(
&mut self,
should_cancel: &(impl Fn() -> bool + Sync),
) -> Result<R, SidecarError>
pub fn receive<R: DeserializeOwned>( &mut self, should_cancel: &(impl Fn() -> bool + Sync), ) -> Result<R, SidecarError>
Reads one reply, killing the child if the caller gives up first.
Sourcepub fn is_running(&mut self) -> bool
pub fn is_running(&mut self) -> bool
Whether the child is still there to serve another request.
Auto Trait Implementations§
impl !Sync for Sidecar
impl Freeze for Sidecar
impl RefUnwindSafe for Sidecar
impl Send for Sidecar
impl Unpin for Sidecar
impl UnsafeUnpin for Sidecar
impl UnwindSafe for Sidecar
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