pub struct UTF32Encoder;Expand description
A 32-bit encoder for UTF-32.
§Examples
use conversion::converter::encoding::utf32::UTF32Encoder;
use conversion::iter::ConvertedIterator;
let iter = "💯❤".chars();
let encoded = ConvertedIterator::new(iter, UTF32Encoder::new());
assert_eq!(Ok(vec![0x1F4AF, 0x2764]), encoded.collect());Implementations§
Source§impl UTF32Encoder
impl UTF32Encoder
Trait Implementations§
Source§impl Clone for UTF32Encoder
impl Clone for UTF32Encoder
Source§fn clone(&self) -> UTF32Encoder
fn clone(&self) -> UTF32Encoder
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 Converter for UTF32Encoder
impl Converter for UTF32Encoder
Source§type Error = Infallible
type Error = Infallible
The type of errors while conversion.
Source§fn convert<E>(
&mut self,
item: Self::Item,
buf: &mut E,
) -> Result<usize, Self::Error>
fn convert<E>( &mut self, item: Self::Item, buf: &mut E, ) -> Result<usize, Self::Error>
Consumes one item, stores outputs into
buf implements Extend, and returns
the number of stored outputs or a conversion error. If there are no outputs yet,
you should store the item and return Ok(0).Source§impl Debug for UTF32Encoder
impl Debug for UTF32Encoder
Source§impl Default for UTF32Encoder
impl Default for UTF32Encoder
Source§fn default() -> UTF32Encoder
fn default() -> UTF32Encoder
Returns the “default value” for a type. Read more
Source§impl PartialEq for UTF32Encoder
impl PartialEq for UTF32Encoder
impl Copy for UTF32Encoder
impl Eq for UTF32Encoder
impl StructuralPartialEq for UTF32Encoder
Auto Trait Implementations§
impl Freeze for UTF32Encoder
impl RefUnwindSafe for UTF32Encoder
impl Send for UTF32Encoder
impl Sync for UTF32Encoder
impl Unpin for UTF32Encoder
impl UnwindSafe for UTF32Encoder
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