Struct pot::Config [−][src]
pub struct Config { /* fields omitted */ }
Expand description
Serialization and deserialization configuration.
Implementations
Sets the maximum number of bytes able to be allocated. This is not guaranteed to be perfectly accurate, due to the limitations of serde deserializers. Pot can keep track of how many bytes it thinks its allocating, but a deserializer can always allocate more memory than Pot can be aware of.
The default allocation budget is usize::MAX
.
pub fn deserialize<'de, T>(&self, serialized: &'de [u8]) -> Result<T> where
T: Deserialize<'de>,
pub fn deserialize<'de, T>(&self, serialized: &'de [u8]) -> Result<T> where
T: Deserialize<'de>,
Deserializes a value from a slice using the configured options.