pub(crate) struct FlycheckHandle {
sender: Sender<StateChange>,
_thread: JoinHandle,
id: usize,
generation: Arc<AtomicUsize>,
}Expand description
Flycheck wraps the shared state and communication machinery used for
running cargo check (or other compatible command) and providing
diagnostics based on the output.
The spawned thread is shut down when this struct is dropped.
Fields§
§sender: Sender<StateChange>§_thread: JoinHandle§id: usize§generation: Arc<AtomicUsize>Implementations§
Source§impl FlycheckHandle
impl FlycheckHandle
pub(crate) fn spawn( id: usize, generation: Arc<AtomicUsize>, sender: Sender<FlycheckMessage>, config: FlycheckConfig, config_json: FlycheckConfigJson, sysroot_root: Option<AbsPathBuf>, workspace_root: AbsPathBuf, manifest_path: Option<AbsPathBuf>, ws_target_dir: Option<Utf8PathBuf>, ) -> FlycheckHandle
Sourcepub(crate) fn restart_workspace(&self, saved_file: Option<AbsPathBuf>)
pub(crate) fn restart_workspace(&self, saved_file: Option<AbsPathBuf>)
Schedule a re-start of the cargo check worker to do a workspace wide check.
Sourcepub(crate) fn restart_for_package(
&self,
package: PackageSpecifier,
target: Option<Target>,
workspace_deps: Option<FxHashSet<PackageSpecifier>>,
saved_file: Option<AbsPathBuf>,
)
pub(crate) fn restart_for_package( &self, package: PackageSpecifier, target: Option<Target>, workspace_deps: Option<FxHashSet<PackageSpecifier>>, saved_file: Option<AbsPathBuf>, )
Schedule a re-start of the cargo check worker to do a package wide check.
pub(crate) fn id(&self) -> usize
pub(crate) fn generation(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlycheckHandle
impl !RefUnwindSafe for FlycheckHandle
impl Send for FlycheckHandle
impl Sync for FlycheckHandle
impl Unpin for FlycheckHandle
impl UnsafeUnpin for FlycheckHandle
impl !UnwindSafe for FlycheckHandle
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§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