Trait minicbor::encode::Encode [−][src]
pub trait Encode { fn encode<W: Write>(
&self,
e: &mut Encoder<W>
) -> Result<(), Error<W::Error>>; }
A type that can be encoded to CBOR.
If this type’s CBOR encoding is meant to be decoded by Decode
impls
derived with minicbor_derive
it is advisable to only produce a
single CBOR data item. Tagging, maps or arrays can and should be used
for multiple values.
Required methods
fn encode<W: Write>(&self, e: &mut Encoder<W>) -> Result<(), Error<W::Error>>
[src]
Encode a value of this type using the given Encoder
.
Implementations on Foreign Types
impl<T: Encode + ?Sized> Encode for &T
[src]
impl<T: Encode + ?Sized> Encode for &T
[src]impl<T: Encode + ?Sized> Encode for &mut T
[src]
impl<T: Encode + ?Sized> Encode for &mut T
[src]impl<T: Encode + ?Sized> Encode for Box<T>
[src]
impl<T: Encode + ?Sized> Encode for Box<T>
[src]impl Encode for str
[src]
impl Encode for str
[src]impl<T: Encode> Encode for Option<T>
[src]
impl<T: Encode> Encode for Option<T>
[src]impl Encode for String
[src]
impl Encode for String
[src]impl<T: ?Sized> Encode for Cow<'_, T> where
T: Encode + ToOwned,
[src]
impl<T: ?Sized> Encode for Cow<'_, T> where
T: Encode + ToOwned,
[src]impl<K, V> Encode for HashMap<K, V> where
K: Encode + Eq + Hash,
V: Encode,
[src]
impl<K, V> Encode for HashMap<K, V> where
K: Encode + Eq + Hash,
V: Encode,
[src]impl<K, V> Encode for BTreeMap<K, V> where
K: Encode + Eq + Ord,
V: Encode,
[src]
impl<K, V> Encode for BTreeMap<K, V> where
K: Encode + Eq + Ord,
V: Encode,
[src]impl<T> Encode for PhantomData<T>
[src]
impl<T> Encode for PhantomData<T>
[src]impl Encode for ()
[src]
impl Encode for ()
[src]impl Encode for usize
[src]
impl Encode for usize
[src]impl Encode for isize
[src]
impl Encode for isize
[src]impl Encode for u8
[src]
impl Encode for u8
[src]impl Encode for i8
[src]
impl Encode for i8
[src]impl Encode for u16
[src]
impl Encode for u16
[src]impl Encode for i16
[src]
impl Encode for i16
[src]impl Encode for u32
[src]
impl Encode for u32
[src]impl Encode for i32
[src]
impl Encode for i32
[src]impl Encode for u64
[src]
impl Encode for u64
[src]impl Encode for i64
[src]
impl Encode for i64
[src]impl Encode for bool
[src]
impl Encode for bool
[src]impl Encode for f32
[src]
impl Encode for f32
[src]impl Encode for f64
[src]
impl Encode for f64
[src]impl Encode for char
[src]
impl Encode for char
[src]impl Encode for NonZeroU8
[src]
impl Encode for NonZeroU8
[src]impl Encode for NonZeroU16
[src]
impl Encode for NonZeroU16
[src]impl Encode for NonZeroU32
[src]
impl Encode for NonZeroU32
[src]impl Encode for NonZeroU64
[src]
impl Encode for NonZeroU64
[src]impl Encode for NonZeroI8
[src]
impl Encode for NonZeroI8
[src]impl Encode for NonZeroI16
[src]
impl Encode for NonZeroI16
[src]impl Encode for NonZeroI32
[src]
impl Encode for NonZeroI32
[src]impl Encode for NonZeroI64
[src]
impl Encode for NonZeroI64
[src]impl<T: Encode> Encode for [T]
[src]
impl<T: Encode> Encode for [T]
[src]impl<T: Encode> Encode for Vec<T>
[src]
impl<T: Encode> Encode for Vec<T>
[src]impl<T: Encode> Encode for VecDeque<T>
[src]
impl<T: Encode> Encode for VecDeque<T>
[src]impl<T: Encode> Encode for LinkedList<T>
[src]
impl<T: Encode> Encode for LinkedList<T>
[src]impl<T: Encode> Encode for BinaryHeap<T>
[src]
impl<T: Encode> Encode for BinaryHeap<T>
[src]impl<T: Encode> Encode for HashSet<T>
[src]
impl<T: Encode> Encode for HashSet<T>
[src]impl<T: Encode> Encode for BTreeSet<T>
[src]
impl<T: Encode> Encode for BTreeSet<T>
[src]impl<T: Encode> Encode for [T; 0]
[src]
impl<T: Encode> Encode for [T; 0]
[src]impl<T: Encode> Encode for [T; 1]
[src]
impl<T: Encode> Encode for [T; 1]
[src]impl<T: Encode> Encode for [T; 2]
[src]
impl<T: Encode> Encode for [T; 2]
[src]impl<T: Encode> Encode for [T; 3]
[src]
impl<T: Encode> Encode for [T; 3]
[src]impl<T: Encode> Encode for [T; 4]
[src]
impl<T: Encode> Encode for [T; 4]
[src]impl<T: Encode> Encode for [T; 5]
[src]
impl<T: Encode> Encode for [T; 5]
[src]impl<T: Encode> Encode for [T; 6]
[src]
impl<T: Encode> Encode for [T; 6]
[src]impl<T: Encode> Encode for [T; 7]
[src]
impl<T: Encode> Encode for [T; 7]
[src]impl<T: Encode> Encode for [T; 8]
[src]
impl<T: Encode> Encode for [T; 8]
[src]impl<T: Encode> Encode for [T; 9]
[src]
impl<T: Encode> Encode for [T; 9]
[src]impl<T: Encode> Encode for [T; 10]
[src]
impl<T: Encode> Encode for [T; 10]
[src]impl<T: Encode> Encode for [T; 11]
[src]
impl<T: Encode> Encode for [T; 11]
[src]impl<T: Encode> Encode for [T; 12]
[src]
impl<T: Encode> Encode for [T; 12]
[src]impl<T: Encode> Encode for [T; 13]
[src]
impl<T: Encode> Encode for [T; 13]
[src]impl<T: Encode> Encode for [T; 14]
[src]
impl<T: Encode> Encode for [T; 14]
[src]impl<T: Encode> Encode for [T; 15]
[src]
impl<T: Encode> Encode for [T; 15]
[src]impl<T: Encode> Encode for [T; 16]
[src]
impl<T: Encode> Encode for [T; 16]
[src]impl<A: Encode> Encode for (A,)
[src]
impl<A: Encode> Encode for (A,)
[src]impl<A: Encode, B: Encode> Encode for (A, B)
[src]
impl<A: Encode, B: Encode> Encode for (A, B)
[src]impl<A: Encode, B: Encode, C: Encode> Encode for (A, B, C)
[src]
impl<A: Encode, B: Encode, C: Encode> Encode for (A, B, C)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode> Encode for (A, B, C, D)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode> Encode for (A, B, C, D)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode> Encode for (A, B, C, D, E)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode> Encode for (A, B, C, D, E)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode> Encode for (A, B, C, D, E, F)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode> Encode for (A, B, C, D, E, F)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode> Encode for (A, B, C, D, E, F, G)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode> Encode for (A, B, C, D, E, F, G)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode> Encode for (A, B, C, D, E, F, G, H)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode> Encode for (A, B, C, D, E, F, G, H)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode> Encode for (A, B, C, D, E, F, G, H, I)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode> Encode for (A, B, C, D, E, F, G, H, I)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode> Encode for (A, B, C, D, E, F, G, H, I, J)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode> Encode for (A, B, C, D, E, F, G, H, I, J)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode, N: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode, N: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode, N: Encode, O: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode, N: Encode, O: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
[src]impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode, N: Encode, O: Encode, P: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
[src]
impl<A: Encode, B: Encode, C: Encode, D: Encode, E: Encode, F: Encode, G: Encode, H: Encode, I: Encode, J: Encode, K: Encode, L: Encode, M: Encode, N: Encode, O: Encode, P: Encode> Encode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
[src]impl Encode for Duration
[src]
impl Encode for Duration
[src]impl Encode for IpAddr
[src]
impl Encode for IpAddr
[src]impl Encode for Ipv4Addr
[src]
impl Encode for Ipv4Addr
[src]impl Encode for Ipv6Addr
[src]
impl Encode for Ipv6Addr
[src]impl Encode for SocketAddr
[src]
impl Encode for SocketAddr
[src]impl Encode for SocketAddrV4
[src]
impl Encode for SocketAddrV4
[src]impl Encode for SocketAddrV6
[src]
impl Encode for SocketAddrV6
[src]