pub struct UTF32BEEncoder;Expand description
A byte encoder for UTF-32 (big-endian).
§Examples
use conversion::converter::encoding::utf32::UTF32BEEncoder;
use conversion::iter::ConvertedIterator;
let iter = "💯❤".chars();
let encoded = ConvertedIterator::new(iter, UTF32BEEncoder::new());
assert_eq!(Ok(b"\x00\x01\xF4\xAF\x00\x00\x27\x64".to_vec()), encoded.collect());Implementations§
Trait Implementations§
Source§impl Clone for UTF32BEEncoder
impl Clone for UTF32BEEncoder
Source§fn clone(&self) -> UTF32BEEncoder
fn clone(&self) -> UTF32BEEncoder
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 UTF32BEEncoder
impl Converter for UTF32BEEncoder
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 UTF32BEEncoder
impl Debug for UTF32BEEncoder
Source§impl Default for UTF32BEEncoder
impl Default for UTF32BEEncoder
Source§fn default() -> UTF32BEEncoder
fn default() -> UTF32BEEncoder
Returns the “default value” for a type. Read more
Source§impl PartialEq for UTF32BEEncoder
impl PartialEq for UTF32BEEncoder
impl Copy for UTF32BEEncoder
impl Eq for UTF32BEEncoder
impl StructuralPartialEq for UTF32BEEncoder
Auto Trait Implementations§
impl Freeze for UTF32BEEncoder
impl RefUnwindSafe for UTF32BEEncoder
impl Send for UTF32BEEncoder
impl Sync for UTF32BEEncoder
impl Unpin for UTF32BEEncoder
impl UnwindSafe for UTF32BEEncoder
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