pub struct Bmp { /* private fields */ }Expand description
A single-code-unit UTF-16 sequence representing a (non-surrogate) character in the Basic Multilingual Plane.
Implementations§
Source§impl Bmp
impl Bmp
Sourcepub const fn is(code_unit: u16) -> bool
pub const fn is(code_unit: u16) -> bool
Whether code_unit is in range for this type (not a surrogate)
§Safety-usable invariant
Iff this method returns true, the safety invariant of new_unchecked()
is satisfied.
Sourcepub const unsafe fn new_unchecked(code_unit: u16) -> Self
pub const unsafe fn new_unchecked(code_unit: u16) -> Self
Sourcepub const fn try_new(code_unit: u16) -> Result<Self, Utf16CodeUnitError>
pub const fn try_new(code_unit: u16) -> Result<Self, Utf16CodeUnitError>
Fallible constructor
Ok if not surrogate and Err otherwise.
Trait Implementations§
impl Copy for Bmp
impl Eq for Bmp
Source§impl Ord for Bmp
impl Ord for Bmp
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Bmp
impl PartialOrd for Bmp
impl StructuralPartialEq for Bmp
Source§impl TryFrom<u16> for Bmp
impl TryFrom<u16> for Bmp
Source§type Error = Utf16CodeUnitError
type Error = Utf16CodeUnitError
The type returned in the event of a conversion error.
impl Utf16CodeUnitSequence for Bmp
Auto Trait Implementations§
impl Freeze for Bmp
impl RefUnwindSafe for Bmp
impl Send for Bmp
impl Sync for Bmp
impl Unpin for Bmp
impl UnsafeUnpin for Bmp
impl UnwindSafe for Bmp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more