pub struct CompilationProgressCallback {
callback: Arc<dyn Fn(CompilationProgress) -> Result<(), UserAbort> + Send + Sync + 'static>,
}Expand description
Wraps a boxed callback that can receive compilation progress notifications.
Fields§
§callback: Arc<dyn Fn(CompilationProgress) -> Result<(), UserAbort> + Send + Sync + 'static>Implementations§
Source§impl CompilationProgressCallback
impl CompilationProgressCallback
Sourcepub fn new<F>(callback: F) -> Self
pub fn new<F>(callback: F) -> Self
Create a new callback wrapper.
The provided callback will be invoked with progress updates during the compilation process,
and has to return a Result<(), UserAbort>.
If the callback returns an error, the compilation will be aborted with a CompileError::Aborted.
Trait Implementations§
Source§impl Clone for CompilationProgressCallback
impl Clone for CompilationProgressCallback
Source§fn clone(&self) -> CompilationProgressCallback
fn clone(&self) -> CompilationProgressCallback
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompilationProgressCallback
impl !RefUnwindSafe for CompilationProgressCallback
impl Send for CompilationProgressCallback
impl Sync for CompilationProgressCallback
impl Unpin for CompilationProgressCallback
impl !UnwindSafe for CompilationProgressCallback
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.