pub struct CoreWorker { /* private fields */ }Expand description
An independently loaded, bound and compiled worker with no received-code or host-I/O grants. Assigned source expansion requires an authenticated session; local constant/ASSUME binding and compilation happen during preparation.
Implementations§
Source§impl CoreWorker
impl CoreWorker
Sourcepub fn serve(
&self,
listener: &TcpListener,
max_units: Option<u64>,
stop: &(dyn Fn() -> bool + Sync),
) -> Result<DistributedUsage, ApiError>
pub fn serve( &self, listener: &TcpListener, max_units: Option<u64>, stop: &(dyn Fn() -> bool + Sync), ) -> Result<DistributedUsage, ApiError>
Serves authenticated work from the supplied listener until the caller
stops it or max_units complete. This never creates a model verdict.
§Errors
Listener/setup failures. Invalid sessions are rejected in worker facts.
Auto Trait Implementations§
impl !RefUnwindSafe for CoreWorker
impl !UnwindSafe for CoreWorker
impl Forget for CoreWorker
impl Freeze for CoreWorker
impl Move for CoreWorker
impl Send for CoreWorker
impl Sync for CoreWorker
impl Unpin for CoreWorker
impl UnsafeUnpin for CoreWorker
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