diff --git a/cbor_smol/all.html b/cbor_smol/all.html index 1e84895..eb5e342 100644 --- a/cbor_smol/all.html +++ b/cbor_smol/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Type Aliases

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Type Aliases

\ No newline at end of file diff --git a/cbor_smol/de/struct.Deserializer.html b/cbor_smol/de/struct.Deserializer.html index 294efa6..dec8739 100644 --- a/cbor_smol/de/struct.Deserializer.html +++ b/cbor_smol/de/struct.Deserializer.html @@ -1,4 +1,4 @@ -Deserializer in cbor_smol::de - Rust

Struct cbor_smol::de::Deserializer

source ·
pub struct Deserializer<'de> { /* private fields */ }
Expand description

A structure for deserializing a cbor-smol message.

+Deserializer in cbor_smol::de - Rust

Struct cbor_smol::de::Deserializer

source ·
pub struct Deserializer<'de> { /* private fields */ }
Expand description

A structure for deserializing a cbor-smol message.

Implementations§

source§

impl<'de> Deserializer<'de>

source

pub fn from_bytes(input: &'de [u8]) -> Self

Obtain a Deserializer from a slice of bytes

Trait Implementations§

source§

impl<'de, 'a> Deserializer<'de> for &'a mut Deserializer<'de>

§

type Error = Error

The error type that can be returned if some error occurs during deserialization.
source§

fn deserialize_any<V>(self, _visitor: V) -> Result<V::Value>
where @@ -87,6 +87,6 @@ deserialize their human-readable form. From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cbor_smol/error/enum.Error.html b/cbor_smol/error/enum.Error.html index 0f0acf1..5023125 100644 --- a/cbor_smol/error/enum.Error.html +++ b/cbor_smol/error/enum.Error.html @@ -1,4 +1,4 @@ -Error in cbor_smol::error - Rust

Enum cbor_smol::error::Error

source ·
#[non_exhaustive]
#[repr(u8)]
pub enum Error { +Error in cbor_smol::error - Rust

Enum cbor_smol::error::Error

source ·
#[non_exhaustive]
#[repr(u8)]
pub enum Error {
Show 22 variants WontImplement, NotYetImplemented, SerializeBufferFull(usize), @@ -44,9 +44,7 @@
§

SerdeSerCustom

Serde Serialization Error

§

SerdeDeCustom

Serde Deserialization Error

§

SerdeMissingField

Serde Missing required value

-

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn custom<T>(_msg: T) -> Self
where - T: Display,

Used when a Serialize implementation encounters any error -while serializing a type. Read more
source§

impl Error for Error

source§

fn custom<T>(msg: T) -> Self
where +

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn custom<T>(msg: T) -> Self
where T: Display,

Raised when there is general error when deserializing a type. Read more
source§

fn missing_field(field: &'static str) -> Self

Raised when a Deserialize struct type expected to receive a required field with a particular name but that field was not present in the input.
source§

fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a type different from what it was @@ -55,7 +53,9 @@ is wrong for some other reason. Read more
source§

fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize enum type received a variant with an unrecognized name.
source§

fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize struct type received a field with an unrecognized name.
source§

fn duplicate_field(field: &'static str) -> Self

Raised when a Deserialize struct type received more than one of the -same field.
source§

impl Error for Error

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl PartialEq for Error

source§

fn eq(&self, other: &Error) -> bool

This method tests for self and other values to be equal, and is used +same field.
source§

impl Error for Error

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Error for Error

source§

fn custom<T>(_msg: T) -> Self
where + T: Display,

Used when a Serialize implementation encounters any error +while serializing a type. Read more
source§

impl PartialEq for Error

source§

fn eq(&self, other: &Error) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Error

source§

impl Eq for Error

source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where @@ -67,6 +67,6 @@ sufficient, and should not be overridden without very good reason.
From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cbor_smol/fn.cbor_deserialize.html b/cbor_smol/fn.cbor_deserialize.html index be9fe59..48a86d9 100644 --- a/cbor_smol/fn.cbor_deserialize.html +++ b/cbor_smol/fn.cbor_deserialize.html @@ -1,3 +1,3 @@ -cbor_deserialize in cbor_smol - Rust

Function cbor_smol::cbor_deserialize

source ·
pub fn cbor_deserialize<'de, T: Deserialize<'de>>(
+cbor_deserialize in cbor_smol - Rust

Function cbor_smol::cbor_deserialize

source ·
pub fn cbor_deserialize<'de, T: Deserialize<'de>>(
     buffer: &'de [u8],
 ) -> Result<T>
\ No newline at end of file diff --git a/cbor_smol/fn.cbor_serialize_bytes.html b/cbor_smol/fn.cbor_serialize_bytes.html deleted file mode 100644 index 5156c89..0000000 --- a/cbor_smol/fn.cbor_serialize_bytes.html +++ /dev/null @@ -1,4 +0,0 @@ -cbor_serialize_bytes in cbor_smol - Rust

Function cbor_smol::cbor_serialize_bytes

source ·
pub fn cbor_serialize_bytes<T: ?Sized + Serialize, const N: usize>(
-    object: &T,
-) -> Result<Bytes<N>>
Expand description

Serialize object into newly allocated Bytes.

-
\ No newline at end of file diff --git a/cbor_smol/fn.cbor_serialize_extending_bytes.html b/cbor_smol/fn.cbor_serialize_extending_bytes.html deleted file mode 100644 index 81f232a..0000000 --- a/cbor_smol/fn.cbor_serialize_extending_bytes.html +++ /dev/null @@ -1,5 +0,0 @@ -cbor_serialize_extending_bytes in cbor_smol - Rust

Function cbor_smol::cbor_serialize_extending_bytes

source ·
pub fn cbor_serialize_extending_bytes<T: ?Sized + Serialize, const N: usize>(
-    object: &T,
-    bytes: &mut Bytes<N>,
-) -> Result<usize>
👎Deprecated: use cbor_serialize_to instead
Expand description

Append serialization of object to existing bytes, returning length of serialized object.

-
\ No newline at end of file diff --git a/cbor_smol/index.html b/cbor_smol/index.html index 80ac7b2..df8e280 100644 --- a/cbor_smol/index.html +++ b/cbor_smol/index.html @@ -1 +1 @@ -cbor_smol - Rust

Crate cbor_smol

source ·

Re-exports§

Modules§

Functions§

\ No newline at end of file +cbor_smol - Rust

Crate cbor_smol

source ·

Re-exports§

Modules§

Functions§

\ No newline at end of file diff --git a/cbor_smol/ser/struct.Serializer.html b/cbor_smol/ser/struct.Serializer.html index 6a6dbfa..81b9a17 100644 --- a/cbor_smol/ser/struct.Serializer.html +++ b/cbor_smol/ser/struct.Serializer.html @@ -1,21 +1,21 @@ -Serializer in cbor_smol::ser - Rust

Struct cbor_smol::ser::Serializer

source ·
pub struct Serializer<W> { /* private fields */ }

Implementations§

source§

impl<W: Writer> Serializer<W>

source

pub fn new(writer: W) -> Self

source

pub fn written(&self) -> usize

source

pub fn into_inner(self) -> W

Unwrap the Writer from the Serializer.

+Serializer in cbor_smol::ser - Rust

Struct cbor_smol::ser::Serializer

source ·
pub struct Serializer<W> { /* private fields */ }

Implementations§

source§

impl<W: Writer> Serializer<W>

source

pub fn new(writer: W) -> Self

source

pub fn written(&self) -> usize

source

pub fn into_inner(self) -> W

Unwrap the Writer from the Serializer.

Trait Implementations§

source§

impl<'a, W> SerializeStruct for &'a mut Serializer<W>
where - W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
where - T: ?Sized + Serialize,

Serialize a struct field.
source§

fn end(self) -> Result<()>

Finish serializing a struct.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct field has been skipped. Read more
source§

impl<'a, W> SerializeStructVariant for &'a mut Serializer<W>
where - W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
where - T: ?Sized + Serialize,

Serialize a struct variant field.
source§

fn end(self) -> Result<()>

Finish serializing a struct variant.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct variant field has been skipped. Read more
source§

impl<'a, W> SerializeTuple for &'a mut Serializer<W>
where - W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_element<T>(&mut self, value: &T) -> Result<()>
where - T: ?Sized + Serialize,

Serialize a tuple element.
source§

fn end(self) -> Result<()>

Finish serializing a tuple.
source§

impl<'a, W> SerializeTupleStruct for &'a mut Serializer<W>
where - W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>
where - T: ?Sized + Serialize,

Serialize a tuple struct field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple struct.
source§

impl<'a, W> SerializeTupleVariant for &'a mut Serializer<W>
where - W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>
where - T: ?Sized + Serialize,

Serialize a tuple variant field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple variant.
source§

impl<'a, W> Serializer for &'a mut Serializer<W>
where - W: Writer,

§

type Ok = ()

The output type produced by this Serializer during successful + W: Writer,
§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
where + T: ?Sized + Serialize,

Serialize a struct field.
source§

fn end(self) -> Result<()>

Finish serializing a struct.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct field has been skipped. Read more
source§

impl<'a, W> SerializeStructVariant for &'a mut Serializer<W>
where + W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
where + T: ?Sized + Serialize,

Serialize a struct variant field.
source§

fn end(self) -> Result<()>

Finish serializing a struct variant.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct variant field has been skipped. Read more
source§

impl<'a, W> SerializeTuple for &'a mut Serializer<W>
where + W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_element<T>(&mut self, value: &T) -> Result<()>
where + T: ?Sized + Serialize,

Serialize a tuple element.
source§

fn end(self) -> Result<()>

Finish serializing a tuple.
source§

impl<'a, W> SerializeTupleStruct for &'a mut Serializer<W>
where + W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>
where + T: ?Sized + Serialize,

Serialize a tuple struct field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple struct.
source§

impl<'a, W> SerializeTupleVariant for &'a mut Serializer<W>
where + W: Writer,

§

type Ok = ()

Must match the Ok type of our Serializer.
§

type Error = Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>
where + T: ?Sized + Serialize,

Serialize a tuple variant field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple variant.
source§

impl<'a, W> Serializer for &'a mut Serializer<W>
where + W: Writer,

§

type Ok = ()

The output type produced by this Serializer during successful serialization. Most serializers that produce text or binary output should set Ok = () and serialize into an io::Write or buffer contained within the Serializer instance. Serializers that build in-memory data structures may be simplified by using Ok to propagate -the data structure around.
§

type Error = Error

The error type when some error occurs during serialization.
§

type SerializeSeq = CollectionSerializer<'a, W>

Type returned from serialize_seq for serializing the content of the +the data structure around.
§

type Error = Error

The error type when some error occurs during serialization.
§

type SerializeSeq = CollectionSerializer<'a, W>

Type returned from serialize_seq for serializing the content of the sequence.
§

type SerializeTuple = &'a mut Serializer<W>

Type returned from serialize_tuple for serializing the content of the tuple.
§

type SerializeTupleStruct = &'a mut Serializer<W>

Type returned from serialize_tuple_struct for serializing the content of the tuple struct.
§

type SerializeTupleVariant = &'a mut Serializer<W>

Type returned from serialize_tuple_variant for serializing the @@ -99,6 +99,6 @@ human-readable form. From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cbor_smol/ser/trait.Writer.html b/cbor_smol/ser/trait.Writer.html index 0c5d68c..b616c07 100644 --- a/cbor_smol/ser/trait.Writer.html +++ b/cbor_smol/ser/trait.Writer.html @@ -1,8 +1,8 @@ -Writer in cbor_smol::ser - Rust

Trait cbor_smol::ser::Writer

source ·
pub trait Writer {
+Writer in cbor_smol::ser - Rust

Trait cbor_smol::ser::Writer

source ·
pub trait Writer {
     type Error: Into<Error>;
 
     // Required method
     fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error>;
 }

Required Associated Types§

source

type Error: Into<Error>

The type of error returned when a write operation fails.

Required Methods§

source

fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error>

Attempts to write an entire buffer into this write.

-

Implementations on Foreign Types§

source§

impl<'a> Writer for &'a mut [u8]

§

type Error = Error

source§

fn write_all(&mut self, buf: &[u8]) -> Result<()>

source§

impl<'a, T: Writer> Writer for &'a mut T

§

type Error = <T as Writer>::Error

source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error>

source§

impl<const N: usize> Writer for Bytes<N>

§

type Error = Error

source§

fn write_all(&mut self, buf: &[u8]) -> Result<()>

source§

impl<const N: usize> Writer for Vec<u8, N>

§

type Error = Error

source§

fn write_all(&mut self, buf: &[u8]) -> Result<()>

Implementors§

\ No newline at end of file +

Implementations on Foreign Types§

source§

impl<'a> Writer for &'a mut [u8]

§

type Error = Error

source§

fn write_all(&mut self, buf: &[u8]) -> Result<()>

source§

impl<'a, T: Writer> Writer for &'a mut T

§

type Error = <T as Writer>::Error

source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error>

Implementors§

\ No newline at end of file diff --git a/cbor_smol/sidebar-items.js b/cbor_smol/sidebar-items.js index e51cd0f..a90f6b4 100644 --- a/cbor_smol/sidebar-items.js +++ b/cbor_smol/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"fn":["cbor_deserialize","cbor_serialize","cbor_serialize_bytes","cbor_serialize_extending_bytes","cbor_serialize_to"],"mod":["de","error","ser"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"fn":["cbor_deserialize","cbor_serialize","cbor_serialize_to"],"mod":["de","error","ser"]}; \ No newline at end of file diff --git a/search-index.js b/search-index.js index 30c4ec6..64da9ed 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["cbor_smol",{"t":"EEHHHHHCCCFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNHNNNPPPPPPPPPPPPPPPPGPPPIPPPPPNNNNNNNNNNNNNNNNRFKNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMN","n":["Error","Result","cbor_deserialize","cbor_serialize","cbor_serialize_bytes","cbor_serialize_extending_bytes","cbor_serialize_to","de","error","ser","Deserializer","borrow","borrow_mut","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_i16","deserialize_i32","deserialize_i64","deserialize_i8","deserialize_identifier","deserialize_ignored_any","deserialize_map","deserialize_newtype_struct","deserialize_option","deserialize_seq","deserialize_str","deserialize_string","deserialize_struct","deserialize_tuple","deserialize_tuple_struct","deserialize_u16","deserialize_u32","deserialize_u64","deserialize_u8","deserialize_unit","deserialize_unit_struct","from","from_bytes","from_bytes","into","take_from_bytes","try_from","try_into","type_id","DeserializeBadBool","DeserializeBadEnum","DeserializeBadI16","DeserializeBadI32","DeserializeBadI64","DeserializeBadI8","DeserializeBadMajor","DeserializeBadU16","DeserializeBadU32","DeserializeBadU64","DeserializeBadU8","DeserializeBadUtf8","DeserializeExpectedNull","DeserializeNonMinimal","DeserializeUnexpectedEnd","Err","Error","InexistentSliceToArrayError","NotYetImplemented","Ok","Result","SerdeDeCustom","SerdeMissingField","SerdeSerCustom","SerializeBufferFull","WontImplement","borrow","borrow_mut","clone","clone_to_uninit","clone_to_uninit","custom","custom","eq","fmt","fmt","from","into","missing_field","try_from","try_into","type_id","Error","Serializer","Writer","borrow","borrow_mut","collect_str","end","end","end","end","end","from","into","into_inner","is_human_readable","new","serialize_bool","serialize_bytes","serialize_char","serialize_element","serialize_f32","serialize_f64","serialize_field","serialize_field","serialize_field","serialize_field","serialize_i16","serialize_i32","serialize_i64","serialize_i8","serialize_map","serialize_newtype_struct","serialize_newtype_variant","serialize_none","serialize_seq","serialize_some","serialize_str","serialize_struct","serialize_struct_variant","serialize_tuple","serialize_tuple_struct","serialize_tuple_variant","serialize_u16","serialize_u32","serialize_u64","serialize_u8","serialize_unit","serialize_unit_struct","serialize_unit_variant","try_from","try_into","type_id","write_all","written"],"q":[[0,"cbor_smol"],[10,"cbor_smol::de"],[50,"cbor_smol::error"],[92,"cbor_smol::ser"],[146,"serde::de"],[147,"core::marker"],[148,"serde::ser"],[149,"heapless_bytes"],[150,"core::result"],[151,"core::any"],[152,"core::fmt"],[153,"core::option"],[154,"core::convert"]],"i":[0,0,0,0,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,0,12,12,12,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,4,0,18,18,4,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,11,0,0,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,11,24],"f":"``{{{f{{d{b}}}}}{{h{c}}}j}{{{f{c}}{f{l{d{b}}}}}{{h{{f{{d{b}}}}}}}{nA`}}{{{f{c}}}{{h{Ab}}}{nA`}}{{{f{c}}{f{lAb}}}{{h{Ad}}}{nA`}}{{{f{c}}e}{{h{Ad}}}{nA`}Af}````{{{f{c}}}{{f{e}}}{}{}}{{{f{lc}}}{{f{le}}}{}{}}{{{f{lAh}}c}hAj}0000{{{f{lAh}}{f{Al}}{f{{d{{f{Al}}}}}}c}hAj}111111111{{{f{lAh}}{f{Al}}c}hAj}22221{{{f{lAh}}Adc}hAj}{{{f{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{f{l{C`{c}}}}{f{Al}}}{{h{Bf}}}Af}{{{f{l{C`{c}}}}{f{Al}}Ad}{{h{e}}}Af{}}{{{f{l{C`{c}}}}{f{Al}}Db{f{Al}}Ad}{{h{e}}}Af{}}{{{f{l{C`{c}}}}Ad}{{h{{f{l{C`{c}}}}}}}Af}{{{f{l{C`{c}}}}{f{Al}}Ad}{{h{{f{l{C`{c}}}}}}}Af}{{{f{l{C`{c}}}}{f{Al}}Db{f{Al}}Ad}{{h{{f{l{C`{c}}}}}}}Af}{{{f{l{C`{c}}}}Dd}{{h{Bf}}}Af}{{{f{l{C`{c}}}}Db}{{h{Bf}}}Af}{{{f{l{C`{c}}}}Df}{{h{Bf}}}Af}{{{f{l{C`{c}}}}b}{{h{Bf}}}Af};9{{{f{l{C`{c}}}}{f{Al}}Db{f{Al}}}{{h{Bf}}}Af}{c{{B`{e}}}{}{}}0{{{f{c}}}Bb{}}{{{f{l{Af{}{{Dh{c}}}}}}{f{{d{b}}}}}{{h{Bfc}}}{{Dj{Bd}}}}{{{f{{C`{c}}}}}AdAf}","D":"Ed","p":[[1,"u8"],[1,"slice"],[1,"reference"],[8,"Result",50],[10,"Deserialize",146],[0,"mut"],[10,"Sized",147],[10,"Serialize",148],[5,"Bytes",149],[1,"usize"],[10,"Writer",92],[5,"Deserializer",10],[10,"Visitor",146],[1,"str"],[1,"tuple"],[6,"Result",150],[5,"TypeId",151],[6,"Error",50],[1,"unit"],[10,"Display",152],[1,"bool"],[5,"Formatter",152],[8,"Result",152],[5,"Serializer",92],[1,"char"],[1,"f32"],[1,"f64"],[1,"i16"],[1,"i32"],[1,"i64"],[1,"i8"],[6,"Option",153],[1,"u32"],[1,"u16"],[1,"u64"],[17,"Error"],[10,"Into",154]],"r":[[0,50],[1,50]],"b":[[81,"impl-Error-for-Error"],[82,"impl-Error-for-Error"],[84,"impl-Debug-for-Error"],[85,"impl-Display-for-Error"],[98,"impl-SerializeTuple-for-%26mut+Serializer%3CW%3E"],[99,"impl-SerializeTupleStruct-for-%26mut+Serializer%3CW%3E"],[100,"impl-SerializeStruct-for-%26mut+Serializer%3CW%3E"],[101,"impl-SerializeTupleVariant-for-%26mut+Serializer%3CW%3E"],[102,"impl-SerializeStructVariant-for-%26mut+Serializer%3CW%3E"],[114,"impl-SerializeStruct-for-%26mut+Serializer%3CW%3E"],[115,"impl-SerializeTupleVariant-for-%26mut+Serializer%3CW%3E"],[116,"impl-SerializeStructVariant-for-%26mut+Serializer%3CW%3E"],[117,"impl-SerializeTupleStruct-for-%26mut+Serializer%3CW%3E"]],"c":"OjAAAAEAAAAAAAAAEAAAAAYA","e":"OzAAAAEAAGgACQAAAAQACAACAAwAHgAwAAIATQAJAFkAAwBeAAkAawAlAJIAAAA="}]\ +["cbor_smol",{"t":"EEHHHCCCFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNHNNNPPPPPPPPPPPPPPPPGPPPIPPPPPNNNNNNNNNNNNNNNNRFKNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMN","n":["Error","Result","cbor_deserialize","cbor_serialize","cbor_serialize_to","de","error","ser","Deserializer","borrow","borrow_mut","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_i16","deserialize_i32","deserialize_i64","deserialize_i8","deserialize_identifier","deserialize_ignored_any","deserialize_map","deserialize_newtype_struct","deserialize_option","deserialize_seq","deserialize_str","deserialize_string","deserialize_struct","deserialize_tuple","deserialize_tuple_struct","deserialize_u16","deserialize_u32","deserialize_u64","deserialize_u8","deserialize_unit","deserialize_unit_struct","from","from_bytes","from_bytes","into","take_from_bytes","try_from","try_into","type_id","DeserializeBadBool","DeserializeBadEnum","DeserializeBadI16","DeserializeBadI32","DeserializeBadI64","DeserializeBadI8","DeserializeBadMajor","DeserializeBadU16","DeserializeBadU32","DeserializeBadU64","DeserializeBadU8","DeserializeBadUtf8","DeserializeExpectedNull","DeserializeNonMinimal","DeserializeUnexpectedEnd","Err","Error","InexistentSliceToArrayError","NotYetImplemented","Ok","Result","SerdeDeCustom","SerdeMissingField","SerdeSerCustom","SerializeBufferFull","WontImplement","borrow","borrow_mut","clone","clone_to_uninit","clone_to_uninit","custom","custom","eq","fmt","fmt","from","into","missing_field","try_from","try_into","type_id","Error","Serializer","Writer","borrow","borrow_mut","collect_str","end","end","end","end","end","from","into","into_inner","is_human_readable","new","serialize_bool","serialize_bytes","serialize_char","serialize_element","serialize_f32","serialize_f64","serialize_field","serialize_field","serialize_field","serialize_field","serialize_i16","serialize_i32","serialize_i64","serialize_i8","serialize_map","serialize_newtype_struct","serialize_newtype_variant","serialize_none","serialize_seq","serialize_some","serialize_str","serialize_struct","serialize_struct_variant","serialize_tuple","serialize_tuple_struct","serialize_tuple_variant","serialize_u16","serialize_u32","serialize_u64","serialize_u8","serialize_unit","serialize_unit_struct","serialize_unit_variant","try_from","try_into","type_id","write_all","written"],"q":[[0,"cbor_smol"],[8,"cbor_smol::de"],[48,"cbor_smol::error"],[90,"cbor_smol::ser"],[144,"serde::de"],[145,"core::marker"],[146,"serde::ser"],[147,"core::result"],[148,"core::any"],[149,"core::fmt"],[150,"core::option"],[151,"core::convert"]],"i":[0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,0,11,11,11,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,4,0,17,17,4,0,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,10,0,0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,10,23],"f":"``{{{f{{d{b}}}}}{{h{c}}}j}{{{f{c}}{f{l{d{b}}}}}{{h{{f{{d{b}}}}}}}{nA`}}{{{f{c}}e}{{h{Ab}}}{nA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char"],[1,"f32"],[1,"f64"],[1,"i16"],[1,"i32"],[1,"i64"],[1,"i8"],[6,"Option",150],[1,"u32"],[1,"u16"],[1,"u64"],[17,"Error"],[10,"Into",151]],"r":[[0,48],[1,48]],"b":[[79,"impl-Error-for-Error"],[80,"impl-Error-for-Error"],[82,"impl-Display-for-Error"],[83,"impl-Debug-for-Error"],[96,"impl-SerializeTuple-for-%26mut+Serializer%3CW%3E"],[97,"impl-SerializeStructVariant-for-%26mut+Serializer%3CW%3E"],[98,"impl-SerializeStruct-for-%26mut+Serializer%3CW%3E"],[99,"impl-SerializeTupleStruct-for-%26mut+Serializer%3CW%3E"],[100,"impl-SerializeTupleVariant-for-%26mut+Serializer%3CW%3E"],[112,"impl-SerializeTupleVariant-for-%26mut+Serializer%3CW%3E"],[113,"impl-SerializeStruct-for-%26mut+Serializer%3CW%3E"],[114,"impl-SerializeTupleStruct-for-%26mut+Serializer%3CW%3E"],[115,"impl-SerializeStructVariant-for-%26mut+Serializer%3CW%3E"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAGgACQAAAAQABgACAAoAHgAuAAIASwAJAFcAAwBcAAkAaQAlAJAAAAA="}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); diff --git a/search.desc/cbor_smol/cbor_smol-desc-0-.js b/search.desc/cbor_smol/cbor_smol-desc-0-.js index d944a5e..ac580f9 100644 --- a/search.desc/cbor_smol/cbor_smol-desc-0-.js +++ b/search.desc/cbor_smol/cbor_smol-desc-0-.js @@ -1 +1 @@ -searchState.loadedDescShard("cbor_smol", 0, "Serialize object into newly allocated Bytes.\nAppend serialization of object to existing bytes, …\nSerialize an object to a Writer\nA structure for deserializing a cbor-smol message.\nReturns the argument unchanged.\nDeserialize a message of type T from a byte slice. The …\nObtain a Deserializer from a slice of bytes\nCalls U::from(self).\nDeserialize a message of type T from a byte slice. The …\nFound a bool that wasn’t 0xf4 or 0xf5\nCould not parse an enum\nExpected a i16, was too large\nExpected a i32, was too large\nExpected a i64, was too large\nExpected a i8, was too large\nExpected a different major type\nExpected a u16\nExpected a u32\nExpected a u64\nExpected a u8\nTried to parse invalid utf-8\nExpected a NULL marker\nValue may be valid, but not encoded in minimal way\nHit the end of buffer, expected more data\nContains the error value\nThis is the error type used by cbor-smol\nInexistent slice-to-array cast error. Used here to avoid …\nThis is a feature that cbor-smol intends to support, but …\nContains the success value\nThis is the Result type used by cbor-smol.\nSerde Deserialization Error\nSerde Missing required value\nSerde Serialization Error\nThe serialize buffer is full\nThis is a feature that cbor-smol will never implement\nReturns the argument unchanged.\nCalls U::from(self).\nThe type of error returned when a write operation fails.\nReturns the argument unchanged.\nCalls U::from(self).\nUnwrap the Writer from the Serializer.\nAttempts to write an entire buffer into this write.") \ No newline at end of file +searchState.loadedDescShard("cbor_smol", 0, "Serialize an object to a Writer\nA structure for deserializing a cbor-smol message.\nReturns the argument unchanged.\nDeserialize a message of type T from a byte slice. The …\nObtain a Deserializer from a slice of bytes\nCalls U::from(self).\nDeserialize a message of type T from a byte slice. The …\nFound a bool that wasn’t 0xf4 or 0xf5\nCould not parse an enum\nExpected a i16, was too large\nExpected a i32, was too large\nExpected a i64, was too large\nExpected a i8, was too large\nExpected a different major type\nExpected a u16\nExpected a u32\nExpected a u64\nExpected a u8\nTried to parse invalid utf-8\nExpected a NULL marker\nValue may be valid, but not encoded in minimal way\nHit the end of buffer, expected more data\nContains the error value\nThis is the error type used by cbor-smol\nInexistent slice-to-array cast error. Used here to avoid …\nThis is a feature that cbor-smol intends to support, but …\nContains the success value\nThis is the Result type used by cbor-smol.\nSerde Deserialization Error\nSerde Missing required value\nSerde Serialization Error\nThe serialize buffer is full\nThis is a feature that cbor-smol will never implement\nReturns the argument unchanged.\nCalls U::from(self).\nThe type of error returned when a write operation fails.\nReturns the argument unchanged.\nCalls U::from(self).\nUnwrap the Writer from the Serializer.\nAttempts to write an entire buffer into this write.") \ No newline at end of file diff --git a/src/cbor_smol/lib.rs.html b/src/cbor_smol/lib.rs.html index 801b8ee..a5e17bd 100644 --- a/src/cbor_smol/lib.rs.html +++ b/src/cbor_smol/lib.rs.html @@ -38,33 +38,6 @@ 38 39 40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67
#![cfg_attr(not(test), no_std)]
 
 #[macro_use]
@@ -101,33 +74,6 @@
     Ok(&buffer[..written])
 }
 
-#[cfg(feature = "heapless-bytes-v0-3")]
-#[deprecated(note = "use `cbor_serialize_to` instead")]
-/// Append serialization of object to existing bytes, returning length of serialized object.
-pub fn cbor_serialize_extending_bytes<T: ?Sized + serde::Serialize, const N: usize>(
-    object: &T,
-    bytes: &mut heapless_bytes_v0_3::Bytes<N>,
-) -> Result<usize> {
-    let len_before = bytes.len();
-    let vec: &mut heapless_v0_7::Vec<u8, N> = bytes;
-    let mut ser = ser::Serializer::new(vec);
-
-    object.serialize(&mut ser)?;
-
-    Ok(ser.into_inner().len() - len_before)
-}
-
-#[cfg(feature = "heapless-bytes-v0-3")]
-/// Serialize object into newly allocated Bytes.
-pub fn cbor_serialize_bytes<T: ?Sized + serde::Serialize, const N: usize>(
-    object: &T,
-) -> Result<heapless_bytes_v0_3::Bytes<N>> {
-    let mut data = heapless_bytes_v0_3::Bytes::<N>::new();
-    #[allow(deprecated)]
-    cbor_serialize_extending_bytes(object, &mut data)?;
-    Ok(data)
-}
-
 pub fn cbor_deserialize<'de, T: serde::Deserialize<'de>>(buffer: &'de [u8]) -> Result<T> {
     // cortex_m_semihosting::hprintln!("deserializing {:?}", buffer).ok();
     de::from_bytes(buffer)