pub struct BinaryFormatter { /* private fields */ }Expand description
This implementation of BufferFormatter trait formats provided bytes buffer in binary number system.
Implementations§
Source§impl BinaryFormatter
impl BinaryFormatter
Sourcepub fn new(provided_separator: Option<&str>) -> Self
pub fn new(provided_separator: Option<&str>) -> Self
Construct a new instance of
BinaryFormatter
using provided borrowed separator. In case if provided
separator will be None, then default separator (:) will be used.
Sourcepub fn new_static(provided_separator: Option<&'static str>) -> Self
pub fn new_static(provided_separator: Option<&'static str>) -> Self
Construct a new instance of
BinaryFormatter
using provided static borrowed separator. In case if provided
separator will be None, then default separator (:) will be used. This method avoids allocation for
static string separators.
Sourcepub fn new_owned(provided_separator: Option<String>) -> Self
pub fn new_owned(provided_separator: Option<String>) -> Self
Construct a new instance of
BinaryFormatter
using provided owned separator. In case if provided
separator will be None, then default separator (:) will be used.
Sourcepub fn new_default() -> Self
pub fn new_default() -> Self
Construct a new instance of
BinaryFormatter
using default separator (:).
Trait Implementations§
Source§impl BufferFormatter for BinaryFormatter
impl BufferFormatter for BinaryFormatter
Source§fn get_separator(&self) -> &str
fn get_separator(&self) -> &str
This method returns a separator which will be inserted between bytes during
format_buffer method call.
It should be implemented manually.Source§impl BufferFormatter for Box<BinaryFormatter>
impl BufferFormatter for Box<BinaryFormatter>
Source§fn get_separator(&self) -> &str
fn get_separator(&self) -> &str
This method returns a separator which will be inserted between bytes during
format_buffer method call.
It should be implemented manually.Source§impl Clone for BinaryFormatter
impl Clone for BinaryFormatter
Source§fn clone(&self) -> BinaryFormatter
fn clone(&self) -> BinaryFormatter
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 BinaryFormatter
impl Debug for BinaryFormatter
Source§impl Default for BinaryFormatter
impl Default for BinaryFormatter
Source§impl Display for BinaryFormatter
impl Display for BinaryFormatter
Source§impl From<&str> for BinaryFormatter
impl From<&str> for BinaryFormatter
Source§impl From<String> for BinaryFormatter
impl From<String> for BinaryFormatter
Source§impl Hash for BinaryFormatter
impl Hash for BinaryFormatter
Source§impl PartialEq for BinaryFormatter
impl PartialEq for BinaryFormatter
impl Eq for BinaryFormatter
impl StructuralPartialEq for BinaryFormatter
Auto Trait Implementations§
impl Freeze for BinaryFormatter
impl RefUnwindSafe for BinaryFormatter
impl Send for BinaryFormatter
impl Sync for BinaryFormatter
impl Unpin for BinaryFormatter
impl UnsafeUnpin for BinaryFormatter
impl UnwindSafe for BinaryFormatter
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