[][src]Enum checkers::Violation

pub enum Violation {
    EmptyEvent,
    AllocationOverlaps {
        requested: Region,
        existing: Region,
    },
    AllocationMisaligned {
        requested: Region,
    },
    DeallocateIncomplete {
        requested: Region,
        existing: Region,
    },
    DeallocateMisaligned {
        requested: Region,
        existing: Region,
    },
    DeallocateMissing {
        requested: Region,
        overlaps: Vec<Region>,
    },
    DanglingRegion {
        region: Region,
    },
}

Variants

EmptyEvent
AllocationOverlaps

Fields of AllocationOverlaps

requested: Regionexisting: Region
AllocationMisaligned

Fields of AllocationMisaligned

requested: Region
DeallocateIncomplete

Fields of DeallocateIncomplete

requested: Regionexisting: Region
DeallocateMisaligned

Fields of DeallocateMisaligned

requested: Regionexisting: Region
DeallocateMissing

Fields of DeallocateMissing

requested: Regionoverlaps: Vec<Region>
DanglingRegion

Fields of DanglingRegion

region: Region

Methods

impl Violation[src]

pub fn is_dangling_region<F>(&self, f: F) -> bool where
    F: FnOnce(Region) -> bool
[src]

Test that this violation refers to a dangling region and that it matches the given predicate.

Examples

let violation = Violation::DanglingRegion {
    region: Region::new(42.into(), 20, 4),
};
assert!(violation.is_dangling_region(|r| r.size == 20 && r.align == 4));

let violation = Violation::EmptyEvent;
assert!(!violation.is_dangling_region(|r| true));

Trait Implementations

impl Debug for Violation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.