pub struct DecSixbit { /* private fields */ }Expand description
The DecSixbit struct stores the encoded bytes and provides methods
for accessing the encoded data and retrieving the original string.
Implementations§
Source§impl DecSixbit
impl DecSixbit
Sourcepub fn new(str: &str) -> Result<Self, Error>
pub fn new(str: &str) -> Result<Self, Error>
Creates a new DecSixbit instance by encoding the input string.
Only accepts ASCII characters in the range 32-95 (space through underscore).
Creates a new DecSixbit instance by encoding the input string.
§Parameters
str: The input string to encode. Must contain only ASCII characters in the range 32-95.
§Errors
Returns an Error::InvalidCharacter if the input contains invalid characters.
§Examples
use dec_sixbit::DecSixbit;
let sixbit = DecSixbit::new("HELLO").unwrap();pub fn try_from_slice(bytes: &[u8]) -> Result<Self, Error>
pub fn from_slice(bytes: &[u8]) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DecSixbit
impl<'de> Deserialize<'de> for DecSixbit
Source§fn deserialize<D: Deserializer<'de>>(
deserializer: D,
) -> Result<DecSixbit, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<DecSixbit, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for DecSixbit
impl Ord for DecSixbit
Source§impl PartialOrd for DecSixbit
impl PartialOrd for DecSixbit
impl Eq for DecSixbit
impl StructuralPartialEq for DecSixbit
Auto Trait Implementations§
impl Freeze for DecSixbit
impl RefUnwindSafe for DecSixbit
impl Send for DecSixbit
impl Sync for DecSixbit
impl Unpin for DecSixbit
impl UnwindSafe for DecSixbit
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