pub enum StandardEncoding {
WinAnsi,
MacRoman,
MacExpert,
Standard,
}Expand description
A named standard PDF encoding.
Variants§
WinAnsi
WinAnsiEncoding — Windows code page 1252 superset.
MacRoman
MacRomanEncoding — Classic Mac OS Roman.
MacExpert
MacExpertEncoding — Mac expert glyph set (small caps, fractions, etc.).
Standard
StandardEncoding — Adobe standard Latin encoding.
Implementations§
Source§impl StandardEncoding
impl StandardEncoding
Sourcepub fn decode(&self, code: u8) -> Option<char>
pub fn decode(&self, code: u8) -> Option<char>
Look up the Unicode character for a given byte code in this encoding.
Returns None for undefined code points (e.g., 0x80–0x8F in WinAnsi
that are undefined, or codes with no mapping).
Sourcepub fn decode_bytes(&self, bytes: &[u8]) -> String
pub fn decode_bytes(&self, bytes: &[u8]) -> String
Decode a byte string into a Unicode string using this encoding.
Bytes with no mapping are replaced with U+FFFD (replacement character).
Trait Implementations§
Source§impl Clone for StandardEncoding
impl Clone for StandardEncoding
Source§fn clone(&self) -> StandardEncoding
fn clone(&self) -> StandardEncoding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StandardEncoding
impl Debug for StandardEncoding
Source§impl PartialEq for StandardEncoding
impl PartialEq for StandardEncoding
impl Copy for StandardEncoding
impl Eq for StandardEncoding
impl StructuralPartialEq for StandardEncoding
Auto Trait Implementations§
impl Freeze for StandardEncoding
impl RefUnwindSafe for StandardEncoding
impl Send for StandardEncoding
impl Sync for StandardEncoding
impl Unpin for StandardEncoding
impl UnsafeUnpin for StandardEncoding
impl UnwindSafe for StandardEncoding
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