serde: Add Base64::into_inner
This commit is contained in:
parent
a39bee9949
commit
47cc004e06
@ -18,7 +18,7 @@ impl<B: AsRef<[u8]>> Base64<B> {
|
||||
Self { bytes }
|
||||
}
|
||||
|
||||
/// Get the raw bytes held by this `Base64` instance.
|
||||
/// Get a reference to the raw bytes held by this `Base64` instance.
|
||||
pub fn as_bytes(&self) -> &[u8] {
|
||||
self.bytes.as_ref()
|
||||
}
|
||||
@ -29,6 +29,13 @@ impl<B: AsRef<[u8]>> Base64<B> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<B> Base64<B> {
|
||||
/// Get the raw bytes held by this `Base64` instance.
|
||||
pub fn into_inner(self) -> B {
|
||||
self.bytes
|
||||
}
|
||||
}
|
||||
|
||||
impl Base64 {
|
||||
/// Create a `Base64` instance containing an empty `Vec<u8>`.
|
||||
pub fn empty() -> Self {
|
||||
|
Loading…
x
Reference in New Issue
Block a user