[−][src]Enum checkers::Violation
Variants
Fields of AllocationMisaligned
requested: Region
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]
F: FnOnce(Region) -> bool,
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
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, 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>,