pub struct JobLease { /* private fields */ }Expand description
Fenced lease returned when a Runtime core claims a job.
Implementations§
Source§impl JobLease
impl JobLease
Sourcepub fn new(
job_id: JobId,
holder_core_id: CoreId,
epoch: u64,
expires_at_ms: u64,
) -> ProviderResult<Self>
pub fn new( job_id: JobId, holder_core_id: CoreId, epoch: u64, expires_at_ms: u64, ) -> ProviderResult<Self>
Creates a fenced job lease.
Sourcepub fn holder_core_id(&self) -> &CoreId
pub fn holder_core_id(&self) -> &CoreId
Returns the core holding the lease.
Sourcepub fn expires_at_ms(&self) -> u64
pub fn expires_at_ms(&self) -> u64
Returns the lease expiration timestamp.
Trait Implementations§
impl Eq for JobLease
impl StructuralPartialEq for JobLease
Auto Trait Implementations§
impl Freeze for JobLease
impl RefUnwindSafe for JobLease
impl Send for JobLease
impl Sync for JobLease
impl Unpin for JobLease
impl UnsafeUnpin for JobLease
impl UnwindSafe for JobLease
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