#[non_exhaustive]pub enum MessageFormat {
Json,
MessagePack(Encoding),
}Available on crate features
json or message-pack only.Expand description
Message data format type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Json
Available on crate feature
json only.JSON format.
MessagePack(Encoding)
Available on crate feature
message-pack only.MessagePack binary format.
MessagePack serialization can produce null bytes, which will break a communication via pipes.
Therefore the messages should be additionally encoded.
Trait Implementations§
Source§impl Clone for MessageFormat
impl Clone for MessageFormat
Source§fn clone(&self) -> MessageFormat
fn clone(&self) -> MessageFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageFormat
impl Debug for MessageFormat
Auto Trait Implementations§
impl Freeze for MessageFormat
impl RefUnwindSafe for MessageFormat
impl Send for MessageFormat
impl Sync for MessageFormat
impl Unpin for MessageFormat
impl UnwindSafe for MessageFormat
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