[−][src]Struct radix64::configs::Fast
The Fast character set
(uses :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
abcdefghijklmnopqrstuvwxyz`)
without padding.
Methods
impl Fast
[src]
pub fn encode<I: ?Sized>(self, input: &I) -> String where
I: AsRef<[u8]>,
[src]
I: AsRef<[u8]>,
See Config::encode.
pub fn encode_with_buffer<'i, 'b, I: ?Sized>(
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> &'b str where
I: AsRef<[u8]>,
[src]
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> &'b str where
I: AsRef<[u8]>,
pub fn encode_slice<I: ?Sized>(self, input: &I, output: &mut [u8]) -> usize where
I: AsRef<[u8]>,
[src]
I: AsRef<[u8]>,
See Config::encode_slice.
pub fn decode<I: ?Sized>(self, input: &I) -> Result<Vec<u8>, DecodeError> where
I: AsRef<[u8]>,
[src]
I: AsRef<[u8]>,
See Config::decode.
pub fn decode_with_buffer<'i, 'b, I: ?Sized>(
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> Result<&'b [u8], DecodeError> where
I: AsRef<[u8]>,
[src]
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> Result<&'b [u8], DecodeError> where
I: AsRef<[u8]>,
pub fn decode_slice<I: ?Sized>(
self,
input: &I,
output: &mut [u8]
) -> Result<usize, DecodeError> where
I: AsRef<[u8]>,
[src]
self,
input: &I,
output: &mut [u8]
) -> Result<usize, DecodeError> where
I: AsRef<[u8]>,
See Config::decode_slice.
Trait Implementations
impl Config for Fast
[src]
fn encode<I: ?Sized>(self, input: &I) -> String where
I: AsRef<[u8]>,
[src]
I: AsRef<[u8]>,
Encode the provided input into a String.
fn encode_with_buffer<'i, 'b, I: ?Sized>(
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> &'b str where
I: AsRef<[u8]>,
[src]
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> &'b str where
I: AsRef<[u8]>,
Encode the provided input into the provided buffer, returning a &str of the encoded input. The returned &str is a view into the beginning of the provided buffer that contains the encoded data. This method overwrites the data in the buffer, it does not append to the buffer. This method exists to provide an efficient way to amortize allocations when repeatedly encoding different inputs. The same buffer can be provided for each invocation and will only be resized when necessary. Any data in the buffer outside the range of the returned &str is not part of the encoded output and should be ignored. Read more
fn encode_slice<I: ?Sized>(self, input: &I, output: &mut [u8]) -> usize where
I: AsRef<[u8]>,
[src]
I: AsRef<[u8]>,
Encode the provided input into the provided output slice. The slice must be large enough to contain the encoded output and panics if it's not. Use input.len() * 4 / 3 + 3
as a conservative estimate. It returns the number of bytes of encoded output written to the output slice. This method allows for the most control over memory placement, but encode_with_buffer
is typically more ergonomic and just as performant. Read more
fn decode<I: ?Sized>(self, input: &I) -> Result<Vec<u8>, DecodeError> where
I: AsRef<[u8]>,
[src]
I: AsRef<[u8]>,
Decode the provided input.
fn decode_with_buffer<'i, 'b, I: ?Sized>(
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> Result<&'b [u8], DecodeError> where
I: AsRef<[u8]>,
[src]
self,
input: &'i I,
buffer: &'b mut Vec<u8>
) -> Result<&'b [u8], DecodeError> where
I: AsRef<[u8]>,
Decode the provided input into the provided buffer, returning a &u8 of the decoded input. The returned &u8 is a view into the beginning of the provided buffer that contains the decoded data. This method overwrites the data in the buffer, it does not append to the buffer. This method exists to provide an efficient way to amortize allocations when repeatedly decoding different inputs. The same buffer can be provided for each invocation and will only be resized when necessary. Any data in the buffer outside the range of the returned &u8 is not part of the decoded output and should be ignored. Read more
fn decode_slice<I: ?Sized>(
self,
input: &I,
output: &mut [u8]
) -> Result<usize, DecodeError> where
I: AsRef<[u8]>,
[src]
self,
input: &I,
output: &mut [u8]
) -> Result<usize, DecodeError> where
I: AsRef<[u8]>,
Decode the provided input into the provided output slice. The slice must be large enough to contain the decoded output and panics if it's not. Use input.len() * 6 / 8 + 1
as a conservative estimate. It returns the number of bytes of decoded output written to the output slice. This method allows for the most control over memory placement, but decode_with_buffer
is typically more ergonomic and just as performant. Read more
impl Clone for Fast
[src]
fn clone(&self) -> Fast
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Fast
[src]
impl Debug for Fast
[src]
Auto Trait Implementations
impl Sync for Fast
impl Send for Fast
impl Unpin for Fast
impl RefUnwindSafe for Fast
impl UnwindSafe for Fast
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,