pub struct EditorExportState {
cancel: Arc<AtomicBool>,
running: Arc<AtomicBool>,
}Expand description
Shared state for the editor export command (ED.22): a cooperative cancel flag plus a single-run guard so a second export can’t un-cancel the first and race the same output file.
Fields§
§cancel: Arc<AtomicBool>§running: Arc<AtomicBool>Implementations§
Source§impl EditorExportState
impl EditorExportState
Sourcefn try_begin(&self) -> Option<ExportRunGuard>
fn try_begin(&self) -> Option<ExportRunGuard>
Claim the single export slot, resetting the cancel flag for the new
run. Returns a guard that releases the slot on drop, or None if an
export is already in flight.
Sourcefn request_cancel(&self)
fn request_cancel(&self)
Raise the cancel flag for an in-flight export.
Sourcefn cancel_flag(&self) -> Arc<AtomicBool> ⓘ
fn cancel_flag(&self) -> Arc<AtomicBool> ⓘ
A clone of the cancel flag for the export job to poll.
Trait Implementations§
Source§impl Default for EditorExportState
impl Default for EditorExportState
Source§fn default() -> EditorExportState
fn default() -> EditorExportState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EditorExportState
impl RefUnwindSafe for EditorExportState
impl Send for EditorExportState
impl Sync for EditorExportState
impl Unpin for EditorExportState
impl UnsafeUnpin for EditorExportState
impl UnwindSafe for EditorExportState
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().