pub struct Transcoder<D>(/* private fields */);
Expand description
A Serde transcoder.
In most cases, the transcode
function should be used instead of this
type.
§Note
Unlike traditional serializable types, Transcoder
’s Serialize
implementation is not idempotent, as it advances the state of its
internal Deserializer
. It should only ever be serialized once.
Implementations§
Source§impl<'de, D> Transcoder<D>where
D: Deserializer<'de>,
impl<'de, D> Transcoder<D>where
D: Deserializer<'de>,
Sourcepub fn new(d: D) -> Transcoder<D>
pub fn new(d: D) -> Transcoder<D>
Constructs a new Transcoder
.
Trait Implementations§
Source§impl<'de, D> Serialize for Transcoder<D>where
D: Deserializer<'de>,
impl<'de, D> Serialize for Transcoder<D>where
D: Deserializer<'de>,
Auto Trait Implementations§
impl<D> !Freeze for Transcoder<D>
impl<D> !RefUnwindSafe for Transcoder<D>
impl<D> Send for Transcoder<D>where
D: Send,
impl<D> !Sync for Transcoder<D>
impl<D> Unpin for Transcoder<D>where
D: Unpin,
impl<D> UnwindSafe for Transcoder<D>where
D: 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