pub struct GenericArray014<Enc: Encoding>(/* private fields */);
Available on crate feature
generic-array-014
only.Expand description
A container for generic_array::GenericArray<...>
from generic-array=0.14
(either with a fixed size or generic).
For use in the #[serde(with)]
field attribute.
Note that the length of the array will be serialized as well;
this is caused by serde
not being able to communicate to format implementations
that the array has a constant size.
See https://github.com/serde-rs/serde/issues/2120 for details.
Implementations§
Source§impl<Enc: Encoding> GenericArray014<Enc>
impl<Enc: Encoding> GenericArray014<Enc>
Sourcepub fn serialize<L, S>(
obj: &GenericArray<u8, L>,
serializer: S,
) -> Result<S::Ok, S::Error>
pub fn serialize<L, S>( obj: &GenericArray<u8, L>, serializer: S, ) -> Result<S::Ok, S::Error>
Serializes array-like data.
Sourcepub fn deserialize<'de, L, D>(
deserializer: D,
) -> Result<GenericArray<u8, L>, D::Error>
pub fn deserialize<'de, L, D>( deserializer: D, ) -> Result<GenericArray<u8, L>, D::Error>
Deserializes into array-like data.
Auto Trait Implementations§
impl<Enc> Freeze for GenericArray014<Enc>
impl<Enc> RefUnwindSafe for GenericArray014<Enc>where
Enc: RefUnwindSafe,
impl<Enc> Send for GenericArray014<Enc>where
Enc: Send,
impl<Enc> Sync for GenericArray014<Enc>where
Enc: Sync,
impl<Enc> Unpin for GenericArray014<Enc>where
Enc: Unpin,
impl<Enc> UnwindSafe for GenericArray014<Enc>where
Enc: UnwindSafe,
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