Loading src/constants/darwin.rs +22 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -99,6 +110,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading src/constants/dragonfly.rs +22 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -78,6 +89,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading src/constants/freebsd.rs +22 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -96,6 +107,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading src/constants/netbsd.rs +22 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: u32) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -66,6 +77,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: u32) -> Self { Self::from_bits_retain(bits) Loading src/constants/openbsd.rs +22 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -67,6 +78,17 @@ bitflags! { } } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading Loading
src/constants/darwin.rs +22 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -99,6 +110,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading
src/constants/dragonfly.rs +22 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -78,6 +89,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading
src/constants/freebsd.rs +22 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -96,6 +107,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading
src/constants/netbsd.rs +22 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: u32) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -66,6 +77,17 @@ bitflags! { } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: u32) -> Self { Self::from_bits_retain(bits) Loading
src/constants/openbsd.rs +22 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,17 @@ bitflags! { } impl EventFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_ushort) -> Self { Self::from_bits_retain(bits) Loading Loading @@ -67,6 +78,17 @@ bitflags! { } } impl FilterFlag { /// Convert from underlying bit representation, preserving all /// bits (even those not corresponding to a defined flag). /// /// # Safety /// /// The caller of the `bitflags!` macro can chose to allow or /// disallow extra bits for their bitflags type. /// /// The caller of `from_bits_unchecked()` has to ensure that /// all bits correspond to a defined flag or that extra bits /// are valid for this bitflags type. #[deprecated = "use the safe `from_bits_retain` method instead"] pub const unsafe fn from_bits_unchecked(bits: c_uint) -> Self { Self::from_bits_retain(bits) Loading