[−][src]Enum checkers::Violation
Variants
Fields of NonZeroedAlloc
requested: Region
Fields of MisalignedAlloc
requested: Region
Fields of MissingFree
requested: Region
Fields of Leaked
region: Region
Methods
impl Violation
[src]
pub fn is_leaked_with<F>(&self, f: F) -> bool where
F: FnOnce(Region) -> bool,
[src]
F: FnOnce(Region) -> bool,
Test that this violation refers to a dangling region and that it matches the given predicate.
Examples
let violation = Violation::Leaked { region: Region::new(42.into(), 20, 4), }; assert!(violation.is_leaked_with(|r| r.size == 20 && r.align == 4)); let requested = Region::new(10.into(), 10, 1); let violation = Violation::MisalignedAlloc { requested }; assert!(!violation.is_leaked_with(|r| true));
Trait Implementations
impl Clone for Violation
[src]
impl Debug for Violation
[src]
impl Display for Violation
[src]
impl Eq for Violation
[src]
impl PartialEq<Violation> for Violation
[src]
impl StructuralEq for Violation
[src]
impl StructuralPartialEq for Violation
[src]
Auto Trait Implementations
impl RefUnwindSafe for Violation
impl Send for Violation
impl Sync for Violation
impl Unpin for Violation
impl UnwindSafe for Violation
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,