pub struct NotTaskSafe {
pub path: String,
pub type_name: String,
}Expand description
The first value in a capture that may not cross a task boundary.
Fields§
§path: StringHow the offending value is reached from the closure, such as
app.metrics or handler -> builder.
type_name: StringThe type that is not task-safe.
Implementations§
Source§impl NotTaskSafe
impl NotTaskSafe
Sourcepub fn subject(&self) -> String
pub fn subject(&self) -> String
How the offending value is named in a diagnostic: as the type itself when the value under test is the problem, and with the path to it when the problem is nested inside a larger value.
A path is written as it is reached from the value under test, so a
leading . is dropped: the root has no name to hang it on.
Trait Implementations§
Source§impl Clone for NotTaskSafe
impl Clone for NotTaskSafe
Source§fn clone(&self) -> NotTaskSafe
fn clone(&self) -> NotTaskSafe
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NotTaskSafe
impl RefUnwindSafe for NotTaskSafe
impl Send for NotTaskSafe
impl Sync for NotTaskSafe
impl Unpin for NotTaskSafe
impl UnsafeUnpin for NotTaskSafe
impl UnwindSafe for NotTaskSafe
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