mod char_private { pub trait Sealed { } }
pub trait IsntCharExt: char_private::Sealed {
#[must_use]
fn is_not_digit(self, radix: u32) -> bool;
#[must_use]
fn is_not_alphabetic(self) -> bool;
#[must_use]
fn is_not_lowercase(self) -> bool;
#[must_use]
fn is_not_uppercase(self) -> bool;
#[must_use]
fn is_not_whitespace(self) -> bool;
#[must_use]
fn is_not_alphanumeric(self) -> bool;
#[must_use]
fn is_not_control(self) -> bool;
#[must_use]
fn is_not_numeric(self) -> bool;
#[must_use]
fn is_not_ascii(&self) -> bool;
#[must_use]
fn is_not_ascii_alphabetic(&self) -> bool;
#[must_use]
fn is_not_ascii_uppercase(&self) -> bool;
#[must_use]
fn is_not_ascii_lowercase(&self) -> bool;
#[must_use]
fn is_not_ascii_alphanumeric(&self) -> bool;
#[must_use]
fn is_not_ascii_digit(&self) -> bool;
#[must_use]
fn is_not_ascii_hexdigit(&self) -> bool;
#[must_use]
fn is_not_ascii_punctuation(&self) -> bool;
#[must_use]
fn is_not_ascii_graphic(&self) -> bool;
#[must_use]
fn is_not_ascii_whitespace(&self) -> bool;
#[must_use]
fn is_not_ascii_control(&self) -> bool;
#[must_use]
fn not_eq_ignore_ascii_case(&self, other: &char) -> bool;
}
impl char_private::Sealed for char { }
impl IsntCharExt for char {
#[inline]
fn is_not_digit(self, radix: u32) -> bool {
!self.is_digit(radix)
}
#[inline]
fn is_not_alphabetic(self) -> bool {
!self.is_alphabetic()
}
#[inline]
fn is_not_lowercase(self) -> bool {
!self.is_lowercase()
}
#[inline]
fn is_not_uppercase(self) -> bool {
!self.is_uppercase()
}
#[inline]
fn is_not_whitespace(self) -> bool {
!self.is_whitespace()
}
#[inline]
fn is_not_alphanumeric(self) -> bool {
!self.is_alphanumeric()
}
#[inline]
fn is_not_control(self) -> bool {
!self.is_control()
}
#[inline]
fn is_not_numeric(self) -> bool {
!self.is_numeric()
}
#[inline]
fn is_not_ascii(&self) -> bool {
!self.is_ascii()
}
#[inline]
fn is_not_ascii_alphabetic(&self) -> bool {
!self.is_ascii_alphabetic()
}
#[inline]
fn is_not_ascii_uppercase(&self) -> bool {
!self.is_ascii_uppercase()
}
#[inline]
fn is_not_ascii_lowercase(&self) -> bool {
!self.is_ascii_lowercase()
}
#[inline]
fn is_not_ascii_alphanumeric(&self) -> bool {
!self.is_ascii_alphanumeric()
}
#[inline]
fn is_not_ascii_digit(&self) -> bool {
!self.is_ascii_digit()
}
#[inline]
fn is_not_ascii_hexdigit(&self) -> bool {
!self.is_ascii_hexdigit()
}
#[inline]
fn is_not_ascii_punctuation(&self) -> bool {
!self.is_ascii_punctuation()
}
#[inline]
fn is_not_ascii_graphic(&self) -> bool {
!self.is_ascii_graphic()
}
#[inline]
fn is_not_ascii_whitespace(&self) -> bool {
!self.is_ascii_whitespace()
}
#[inline]
fn is_not_ascii_control(&self) -> bool {
!self.is_ascii_control()
}
#[inline]
fn not_eq_ignore_ascii_case(&self, other: &char) -> bool {
!self.eq_ignore_ascii_case(other)
}
}
mod const_ptr_private { pub trait Sealed<T: ?Sized> { } }
pub trait IsntConstPtrExt<T: ?Sized>: const_ptr_private::Sealed<T> {
#[must_use]
fn is_not_null(self) -> bool;
#[must_use]
fn is_not_aligned(self) -> bool where T: Sized;
}
impl<T: ?Sized> const_ptr_private::Sealed<T> for *const T { }
impl<T: ?Sized> IsntConstPtrExt<T> for *const T {
#[inline]
fn is_not_null(self) -> bool {
!self.is_null()
}
#[inline]
fn is_not_aligned(self) -> bool where T: Sized {
!self.is_aligned()
}
}
mod const_ptr_slice_private { pub trait Sealed<T> { } }
pub trait IsntConstPtrSliceExt<T>: const_ptr_slice_private::Sealed<T> {
#[must_use]
fn is_not_empty(self) -> bool;
}
impl<T> const_ptr_slice_private::Sealed<T> for *const [T] { }
impl<T> IsntConstPtrSliceExt<T> for *const [T] {
#[inline]
fn is_not_empty(self) -> bool {
!self.is_empty()
}
}
mod f32_private { pub trait Sealed { } }
pub trait IsntF32Ext: f32_private::Sealed {
#[must_use]
fn is_not_nan(self) -> bool;
#[must_use]
fn is_not_infinite(self) -> bool;
#[must_use]
fn is_not_finite(self) -> bool;
#[must_use]
fn is_not_normal(self) -> bool;
#[must_use]
fn is_not_sign_positive(self) -> bool;
#[must_use]
fn is_not_sign_negative(self) -> bool;
#[must_use]
fn is_not_subnormal(self) -> bool;
}
impl f32_private::Sealed for f32 { }
impl IsntF32Ext for f32 {
#[inline]
fn is_not_nan(self) -> bool {
!self.is_nan()
}
#[inline]
fn is_not_infinite(self) -> bool {
!self.is_infinite()
}
#[inline]
fn is_not_finite(self) -> bool {
!self.is_finite()
}
#[inline]
fn is_not_normal(self) -> bool {
!self.is_normal()
}
#[inline]
fn is_not_sign_positive(self) -> bool {
!self.is_sign_positive()
}
#[inline]
fn is_not_sign_negative(self) -> bool {
!self.is_sign_negative()
}
#[inline]
fn is_not_subnormal(self) -> bool {
!self.is_subnormal()
}
}
mod f64_private { pub trait Sealed { } }
pub trait IsntF64Ext: f64_private::Sealed {
#[must_use]
fn is_not_nan(self) -> bool;
#[must_use]
fn is_not_infinite(self) -> bool;
#[must_use]
fn is_not_finite(self) -> bool;
#[must_use]
fn is_not_normal(self) -> bool;
#[must_use]
fn is_not_sign_positive(self) -> bool;
#[must_use]
fn is_not_sign_negative(self) -> bool;
#[must_use]
fn is_not_subnormal(self) -> bool;
}
impl f64_private::Sealed for f64 { }
impl IsntF64Ext for f64 {
#[inline]
fn is_not_nan(self) -> bool {
!self.is_nan()
}
#[inline]
fn is_not_infinite(self) -> bool {
!self.is_infinite()
}
#[inline]
fn is_not_finite(self) -> bool {
!self.is_finite()
}
#[inline]
fn is_not_normal(self) -> bool {
!self.is_normal()
}
#[inline]
fn is_not_sign_positive(self) -> bool {
!self.is_sign_positive()
}
#[inline]
fn is_not_sign_negative(self) -> bool {
!self.is_sign_negative()
}
#[inline]
fn is_not_subnormal(self) -> bool {
!self.is_subnormal()
}
}
mod i128_private { pub trait Sealed { } }
pub trait IsntI128Ext: i128_private::Sealed {
#[must_use]
fn is_not_negative(self) -> bool;
#[must_use]
fn is_not_positive(self) -> bool;
}
impl i128_private::Sealed for i128 { }
impl IsntI128Ext for i128 {
#[inline]
fn is_not_negative(self) -> bool {
!self.is_negative()
}
#[inline]
fn is_not_positive(self) -> bool {
!self.is_positive()
}
}
mod i16_private { pub trait Sealed { } }
pub trait IsntI16Ext: i16_private::Sealed {
#[must_use]
fn is_not_negative(self) -> bool;
#[must_use]
fn is_not_positive(self) -> bool;
}
impl i16_private::Sealed for i16 { }
impl IsntI16Ext for i16 {
#[inline]
fn is_not_negative(self) -> bool {
!self.is_negative()
}
#[inline]
fn is_not_positive(self) -> bool {
!self.is_positive()
}
}
mod i32_private { pub trait Sealed { } }
pub trait IsntI32Ext: i32_private::Sealed {
#[must_use]
fn is_not_negative(self) -> bool;
#[must_use]
fn is_not_positive(self) -> bool;
}
impl i32_private::Sealed for i32 { }
impl IsntI32Ext for i32 {
#[inline]
fn is_not_negative(self) -> bool {
!self.is_negative()
}
#[inline]
fn is_not_positive(self) -> bool {
!self.is_positive()
}
}
mod i64_private { pub trait Sealed { } }
pub trait IsntI64Ext: i64_private::Sealed {
#[must_use]
fn is_not_negative(self) -> bool;
#[must_use]
fn is_not_positive(self) -> bool;
}
impl i64_private::Sealed for i64 { }
impl IsntI64Ext for i64 {
#[inline]
fn is_not_negative(self) -> bool {
!self.is_negative()
}
#[inline]
fn is_not_positive(self) -> bool {
!self.is_positive()
}
}
mod i8_private { pub trait Sealed { } }
pub trait IsntI8Ext: i8_private::Sealed {
#[must_use]
fn is_not_negative(self) -> bool;
#[must_use]
fn is_not_positive(self) -> bool;
}
impl i8_private::Sealed for i8 { }
impl IsntI8Ext for i8 {
#[inline]
fn is_not_negative(self) -> bool {
!self.is_negative()
}
#[inline]
fn is_not_positive(self) -> bool {
!self.is_positive()
}
}
mod isize_private { pub trait Sealed { } }
pub trait IsntIsizeExt: isize_private::Sealed {
#[must_use]
fn is_not_negative(self) -> bool;
#[must_use]
fn is_not_positive(self) -> bool;
}
impl isize_private::Sealed for isize { }
impl IsntIsizeExt for isize {
#[inline]
fn is_not_negative(self) -> bool {
!self.is_negative()
}
#[inline]
fn is_not_positive(self) -> bool {
!self.is_positive()
}
}
mod mut_ptr_private { pub trait Sealed<T: ?Sized> { } }
pub trait IsntMutPtrExt<T: ?Sized>: mut_ptr_private::Sealed<T> {
#[must_use]
fn is_not_null(self) -> bool;
#[must_use]
fn is_not_aligned(self) -> bool where T: Sized;
}
impl<T: ?Sized> mut_ptr_private::Sealed<T> for *mut T { }
impl<T: ?Sized> IsntMutPtrExt<T> for *mut T {
#[inline]
fn is_not_null(self) -> bool {
!self.is_null()
}
#[inline]
fn is_not_aligned(self) -> bool where T: Sized {
!self.is_aligned()
}
}
mod mut_ptr_slice_private { pub trait Sealed<T> { } }
pub trait IsntMutPtrSliceExt<T>: mut_ptr_slice_private::Sealed<T> {
#[must_use]
fn is_not_empty(self) -> bool;
}
impl<T> mut_ptr_slice_private::Sealed<T> for *mut [T] { }
impl<T> IsntMutPtrSliceExt<T> for *mut [T] {
#[inline]
fn is_not_empty(self) -> bool {
!self.is_empty()
}
}
mod slice_private { pub trait Sealed<T> { } }
pub trait IsntSliceExt<T>: slice_private::Sealed<T> {
#[must_use]
fn is_not_empty(&self) -> bool;
#[must_use]
fn not_contains(&self, x: &T) -> bool where T: PartialEq;
#[must_use]
fn not_starts_with(&self, needle: &[T]) -> bool where T: PartialEq;
#[must_use]
fn not_ends_with(&self, needle: &[T]) -> bool where T: PartialEq;
#[must_use]
fn is_not_sorted(&self) -> bool where T: PartialOrd;
#[must_use]
fn is_not_sorted_by<'a, F>(&'a self, compare: F) -> bool where T: 'a, F: FnMut(&'a T, &'a T) -> bool;
#[must_use]
fn is_not_sorted_by_key<'a, F, K>(&'a self, f: F) -> bool where T: 'a, F: FnMut(&'a T) -> K, K: PartialOrd;
}
impl<T> slice_private::Sealed<T> for [T] { }
impl<T> IsntSliceExt<T> for [T] {
#[inline]
fn is_not_empty(&self) -> bool {
!self.is_empty()
}
#[inline]
fn not_contains(&self, x: &T) -> bool where T: PartialEq {
!self.contains(x)
}
#[inline]
fn not_starts_with(&self, needle: &[T]) -> bool where T: PartialEq {
!self.starts_with(needle)
}
#[inline]
fn not_ends_with(&self, needle: &[T]) -> bool where T: PartialEq {
!self.ends_with(needle)
}
#[inline]
fn is_not_sorted(&self) -> bool where T: PartialOrd {
!self.is_sorted()
}
#[inline]
fn is_not_sorted_by<'a, F>(&'a self, compare: F) -> bool where T: 'a, F: FnMut(&'a T, &'a T) -> bool {
!self.is_sorted_by::<'a, F>(compare)
}
#[inline]
fn is_not_sorted_by_key<'a, F, K>(&'a self, f: F) -> bool where T: 'a, F: FnMut(&'a T) -> K, K: PartialOrd {
!self.is_sorted_by_key::<'a, F, K>(f)
}
}
mod str_private { pub trait Sealed { } }
pub trait IsntStrExt: str_private::Sealed {
#[must_use]
fn is_not_ascii(&self) -> bool;
#[must_use]
fn is_not_char_boundary(&self, index: usize) -> bool;
#[must_use]
fn is_not_empty(&self) -> bool;
#[must_use]
fn not_eq_ignore_ascii_case(&self, other: &str) -> bool;
}
impl str_private::Sealed for str { }
impl IsntStrExt for str {
#[inline]
fn is_not_ascii(&self) -> bool {
!self.is_ascii()
}
#[inline]
fn is_not_char_boundary(&self, index: usize) -> bool {
!self.is_char_boundary(index)
}
#[inline]
fn is_not_empty(&self) -> bool {
!self.is_empty()
}
#[inline]
fn not_eq_ignore_ascii_case(&self, other: &str) -> bool {
!self.eq_ignore_ascii_case(other)
}
}
mod u128_private { pub trait Sealed { } }
pub trait IsntU128Ext: u128_private::Sealed {
#[must_use]
fn is_not_power_of_two(self) -> bool;
}
impl u128_private::Sealed for u128 { }
impl IsntU128Ext for u128 {
#[inline]
fn is_not_power_of_two(self) -> bool {
!self.is_power_of_two()
}
}
mod u16_private { pub trait Sealed { } }
pub trait IsntU16Ext: u16_private::Sealed {
#[must_use]
fn is_not_power_of_two(self) -> bool;
}
impl u16_private::Sealed for u16 { }
impl IsntU16Ext for u16 {
#[inline]
fn is_not_power_of_two(self) -> bool {
!self.is_power_of_two()
}
}
mod u32_private { pub trait Sealed { } }
pub trait IsntU32Ext: u32_private::Sealed {
#[must_use]
fn is_not_power_of_two(self) -> bool;
}
impl u32_private::Sealed for u32 { }
impl IsntU32Ext for u32 {
#[inline]
fn is_not_power_of_two(self) -> bool {
!self.is_power_of_two()
}
}
mod u64_private { pub trait Sealed { } }
pub trait IsntU64Ext: u64_private::Sealed {
#[must_use]
fn is_not_power_of_two(self) -> bool;
}
impl u64_private::Sealed for u64 { }
impl IsntU64Ext for u64 {
#[inline]
fn is_not_power_of_two(self) -> bool {
!self.is_power_of_two()
}
}
mod u8_private { pub trait Sealed { } }
pub trait IsntU8Ext: u8_private::Sealed {
#[must_use]
fn is_not_ascii(&self) -> bool;
#[must_use]
fn is_not_ascii_alphabetic(&self) -> bool;
#[must_use]
fn is_not_ascii_uppercase(&self) -> bool;
#[must_use]
fn is_not_ascii_lowercase(&self) -> bool;
#[must_use]
fn is_not_ascii_alphanumeric(&self) -> bool;
#[must_use]
fn is_not_ascii_digit(&self) -> bool;
#[must_use]
fn is_not_ascii_hexdigit(&self) -> bool;
#[must_use]
fn is_not_ascii_punctuation(&self) -> bool;
#[must_use]
fn is_not_ascii_graphic(&self) -> bool;
#[must_use]
fn is_not_ascii_whitespace(&self) -> bool;
#[must_use]
fn is_not_ascii_control(&self) -> bool;
#[must_use]
fn is_not_power_of_two(self) -> bool;
#[must_use]
fn not_eq_ignore_ascii_case(&self, other: &u8) -> bool;
}
impl u8_private::Sealed for u8 { }
impl IsntU8Ext for u8 {
#[inline]
fn is_not_ascii(&self) -> bool {
!self.is_ascii()
}
#[inline]
fn is_not_ascii_alphabetic(&self) -> bool {
!self.is_ascii_alphabetic()
}
#[inline]
fn is_not_ascii_uppercase(&self) -> bool {
!self.is_ascii_uppercase()
}
#[inline]
fn is_not_ascii_lowercase(&self) -> bool {
!self.is_ascii_lowercase()
}
#[inline]
fn is_not_ascii_alphanumeric(&self) -> bool {
!self.is_ascii_alphanumeric()
}
#[inline]
fn is_not_ascii_digit(&self) -> bool {
!self.is_ascii_digit()
}
#[inline]
fn is_not_ascii_hexdigit(&self) -> bool {
!self.is_ascii_hexdigit()
}
#[inline]
fn is_not_ascii_punctuation(&self) -> bool {
!self.is_ascii_punctuation()
}
#[inline]
fn is_not_ascii_graphic(&self) -> bool {
!self.is_ascii_graphic()
}
#[inline]
fn is_not_ascii_whitespace(&self) -> bool {
!self.is_ascii_whitespace()
}
#[inline]
fn is_not_ascii_control(&self) -> bool {
!self.is_ascii_control()
}
#[inline]
fn is_not_power_of_two(self) -> bool {
!self.is_power_of_two()
}
#[inline]
fn not_eq_ignore_ascii_case(&self, other: &u8) -> bool {
!self.eq_ignore_ascii_case(other)
}
}
mod u8_slice_private { pub trait Sealed { } }
pub trait IsntU8SliceExt: u8_slice_private::Sealed {
#[must_use]
fn is_not_ascii(&self) -> bool;
#[must_use]
fn not_eq_ignore_ascii_case(&self, other: &[u8]) -> bool;
}
impl u8_slice_private::Sealed for [u8] { }
impl IsntU8SliceExt for [u8] {
#[inline]
fn is_not_ascii(&self) -> bool {
!self.is_ascii()
}
#[inline]
fn not_eq_ignore_ascii_case(&self, other: &[u8]) -> bool {
!self.eq_ignore_ascii_case(other)
}
}
mod usize_private { pub trait Sealed { } }
pub trait IsntUsizeExt: usize_private::Sealed {
#[must_use]
fn is_not_power_of_two(self) -> bool;
}
impl usize_private::Sealed for usize { }
impl IsntUsizeExt for usize {
#[inline]
fn is_not_power_of_two(self) -> bool {
!self.is_power_of_two()
}
}