pub struct SerializableMap<K, V>(/* private fields */)
where
K: Ord + Serialize,
V: Serialize;Implementations§
Source§impl<K, V> SerializableMap<K, V>
impl<K, V> SerializableMap<K, V>
pub fn new() -> SerializableMap<K, V>
pub fn from(items: Vec<(K, V)>) -> SerializableMap<K, V>
pub fn set(&mut self, key: K, value: V)
pub fn delete(&mut self, key: &K) -> bool
pub fn get(&self, key: &K) -> Option<&V>
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
pub fn iter(&self) -> Iter<'_, K, V> ⓘ
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<K, V> Clone for SerializableMap<K, V>
impl<K, V> Clone for SerializableMap<K, V>
Source§fn clone(&self) -> SerializableMap<K, V>
fn clone(&self) -> SerializableMap<K, V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K, V> Debug for SerializableMap<K, V>
impl<K, V> Debug for SerializableMap<K, V>
Source§impl<K, V> Default for SerializableMap<K, V>
impl<K, V> Default for SerializableMap<K, V>
Source§fn default() -> SerializableMap<K, V>
fn default() -> SerializableMap<K, V>
Returns the “default value” for a type. Read more
Source§impl<'d, K, V> Deserialize<'d> for SerializableMap<K, V>
impl<'d, K, V> Deserialize<'d> for SerializableMap<K, V>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'d>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'d>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<K, V> JsonSchema for SerializableMap<K, V>
impl<K, V> JsonSchema for SerializableMap<K, V>
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl<K, V> PartialEq for SerializableMap<K, V>
impl<K, V> PartialEq for SerializableMap<K, V>
Source§impl<K, V> Serialize for SerializableMap<K, V>
impl<K, V> Serialize for SerializableMap<K, V>
impl<K, V> StructuralPartialEq for SerializableMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for SerializableMap<K, V>
impl<K, V> RefUnwindSafe for SerializableMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for SerializableMap<K, V>
impl<K, V> Sync for SerializableMap<K, V>
impl<K, V> Unpin for SerializableMap<K, V>
impl<K, V> UnsafeUnpin for SerializableMap<K, V>
impl<K, V> UnwindSafe for SerializableMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more