Struct decoded_char::DecodedChar
source · [−]pub struct DecodedChar { /* private fields */ }Expand description
Decoded character.
A character and its original byte length in the encoded source file.
Implementations
sourceimpl DecodedChar
impl DecodedChar
sourcepub fn new(c: char, len: usize) -> Self
pub fn new(c: char, len: usize) -> Self
Creates a new decoded character from its value, c,
and its original byte length len in the encoded source file.
sourcepub fn from_utf8(c: char) -> Self
pub fn from_utf8(c: char) -> Self
Creates a new decoded character, decoded from an UTF-8 encoded source file.
sourcepub fn from_utf16(c: char) -> Self
pub fn from_utf16(c: char) -> Self
Creates a new decoded character, decoded from an UTF-16 encoded source file.
Trait Implementations
sourceimpl AsRef<char> for DecodedChar
impl AsRef<char> for DecodedChar
sourceimpl Borrow<char> for DecodedChar
impl Borrow<char> for DecodedChar
sourceimpl Deref for DecodedChar
impl Deref for DecodedChar
sourceimpl From<DecodedChar> for char
impl From<DecodedChar> for char
sourcefn from(dc: DecodedChar) -> Self
fn from(dc: DecodedChar) -> Self
Converts to this type from the input type.
sourceimpl From<DecodedChar> for u32
impl From<DecodedChar> for u32
sourcefn from(dc: DecodedChar) -> Self
fn from(dc: DecodedChar) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for DecodedChar
impl Send for DecodedChar
impl Sync for DecodedChar
impl Unpin for DecodedChar
impl UnwindSafe for DecodedChar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more