pub enum Value {
Null,
Boolean(bool),
Number(NumberBuf),
String(String),
Array(Array),
Object(Object),
}Expand description
JSON Value.
§Parsing
You can parse a Value by importing the Parse trait providing a
collection of parsing functions.
§Example
use jstrict::{Value, Parse, CodeMap};
let (value, code_map) = Value::parse_str("{ \"key\": \"value\" }").unwrap();The code_map value of type CodeMap contains code-mapping information
about all the fragments of the JSON value (their location in the source
text).
§Comparison
This type implements the usual comparison traits PartialEq, Eq,
PartialOrd and Ord. However by default JSON object entries ordering
matters, meaning that { "a": 0, "b": 1 } is not equal to
{ "b": 1, "a": 0 }.
If you want to do comparisons while ignoring entries ordering, you can use
the Unordered type (combined with the UnorderedPartialEq trait).
Any T reference can be turned into an Unordered<T> reference
at will using the BorrowUnordered::as_unordered method.
§Example
use jstrict::{json, Unordered, BorrowUnordered};
let a = json!({ "a": 0, "b": 1 });
let b = json!({ "b": 1, "a": 0 });
assert_ne!(a, b); // not equals entries are in a different order.
assert_eq!(a.as_unordered(), b.as_unordered()); // equals modulo entry order.
assert_eq!(Unordered(a), Unordered(b)); // equals modulo entry order.§Printing
The Print trait provide a highly configurable printing method.
§Example
use jstrict::{Value, Parse, Print};
let value = Value::parse_str("[ 0, 1, { \"key\": \"value\" }, null ]").unwrap().0;
println!("{}", value.pretty_print()); // multi line, indent with 2 spaces
println!("{}", value.inline_print()); // single line, spaces
println!("{}", value.compact_print()); // single line, no spaces
let mut options = jstrict::print::Options::pretty();
options.indent = jstrict::print::Indent::Tabs(1);
println!("{}", value.print_with(options)); // multi line, indent with tabsVariants§
Null
null.
Boolean(bool)
Boolean true or false.
Number(NumberBuf)
Number.
String(String)
String.
Array(Array)
Array.
Object(Object)
Object.
Implementations§
Source§impl Value
impl Value
Sourcepub fn from_serde_json(value: Value) -> Self
Available on crate feature serde_json only.
pub fn from_serde_json(value: Value) -> Self
serde_json only.Converts a serde_json::Value into a Value.
§Example
// First we create a `serde_json` value.
let a = serde_json::json!({
"foo": 1,
"bar": [2, 3]
});
// We convert the `serde_json` value into a `jstrict` value.
let b = jstrict::Value::from_serde_json(a);
// We convert it back into a `serde_json` value.
let _ = jstrict::Value::into_serde_json(b);Sourcepub fn into_serde_json(self) -> Value
Available on crate feature serde_json only.
pub fn into_serde_json(self) -> Value
serde_json only.Converts a Value into a serde_json::Value.
§Example
// First we create a `serde_json` value.
let a = serde_json::json!({
"foo": 1,
"bar": [2, 3]
});
// We convert the `serde_json` value into a `jstrict` value.
let b = jstrict::Value::from_serde_json(a);
// We convert it back into a `serde_json` value.
let _ = jstrict::Value::into_serde_json(b);Source§impl Value
impl Value
Sourcepub fn from_sonic_rs(value: Value) -> Self
Available on crate feature sonic-rs only.
pub fn from_sonic_rs(value: Value) -> Self
sonic-rs only.Converts a sonic_rs::Value into a Value.
§Example
// First we create a `sonic_rs` value.
let a = sonic_rs::json!({
"foo": 1,
"bar": [2, 3]
});
// We convert the `sonic_rs` value into a `jstrict` value.
let b = jstrict::Value::from_sonic_rs(a);
// We convert it back into a `sonic_rs` value.
let _ = jstrict::Value::into_sonic_rs(b);Sourcepub fn into_sonic_rs(self) -> Value
Available on crate feature sonic-rs only.
pub fn into_sonic_rs(self) -> Value
sonic-rs only.Converts a Value into a sonic_rs::Value.
§Example
// First we create a `sonic_rs` value.
let a = sonic_rs::json!({
"foo": 1,
"bar": [2, 3]
});
// We convert the `sonic_rs` value into a `jstrict` value.
let b = jstrict::Value::from_sonic_rs(a);
// We convert it back into a `sonic_rs` value.
let _ = jstrict::Value::into_sonic_rs(b);Source§impl Value
impl Value
Sourcepub fn get_fragment(&self, index: usize) -> Result<FragmentRef<'_>, usize>
pub fn get_fragment(&self, index: usize) -> Result<FragmentRef<'_>, usize>
Returns the fragment at the given index in traversal order, where
index 0 is self.
Fragment indices match CodeMap offsets: the fragment returned for
index i is described by code_map[offset + i]. On failure, returns
the number of fragments left to skip.
Sourcepub const fn is_boolean(&self) -> bool
pub const fn is_boolean(&self) -> bool
Checks if this value is a boolean.
Sourcepub fn is_empty_array_or_object(&self) -> bool
pub fn is_empty_array_or_object(&self) -> bool
Checks if the value is either an empty array or an empty object.
Sourcepub const fn as_boolean(&self) -> Option<bool>
pub const fn as_boolean(&self) -> Option<bool>
Returns this value as a bool, if it is a boolean.
Sourcepub const fn as_boolean_mut(&mut self) -> Option<&mut bool>
pub const fn as_boolean_mut(&mut self) -> Option<&mut bool>
Returns a mutable reference to the inner bool, if this is a boolean.
Sourcepub const fn as_number_mut(&mut self) -> Option<&mut NumberBuf>
pub const fn as_number_mut(&mut self) -> Option<&mut NumberBuf>
Returns a mutable reference to the inner number buffer, if this is a number.
Sourcepub const fn as_string_mut(&mut self) -> Option<&mut String>
pub const fn as_string_mut(&mut self) -> Option<&mut String>
Returns a mutable reference to the inner string, if this is a string.
Sourcepub fn as_array(&self) -> Option<&[Self]>
pub fn as_array(&self) -> Option<&[Self]>
Returns this value as a slice of values, if it is an array.
Sourcepub const fn as_array_mut(&mut self) -> Option<&mut Array>
pub const fn as_array_mut(&mut self) -> Option<&mut Array>
Returns a mutable reference to the inner array, if this is an array.
Sourcepub fn force_as_array(&self) -> &[Self]
pub fn force_as_array(&self) -> &[Self]
Return the given value as an array, even if it is not an array.
Returns the input value as is if it is already an array, or puts it in a slice with a single element if it is not.
Sourcepub const fn as_object(&self) -> Option<&Object>
pub const fn as_object(&self) -> Option<&Object>
Returns this value as an Object, if it is an object.
Sourcepub const fn as_object_mut(&mut self) -> Option<&mut Object>
pub const fn as_object_mut(&mut self) -> Option<&mut Object>
Returns a mutable reference to the inner object, if this is an object.
Sourcepub fn into_boolean(self) -> Option<bool>
pub fn into_boolean(self) -> Option<bool>
Consumes this value, returning the inner bool if it is a boolean.
Sourcepub fn into_number(self) -> Option<NumberBuf>
pub fn into_number(self) -> Option<NumberBuf>
Consumes this value, returning the inner number if it is a number.
Sourcepub fn into_string(self) -> Option<String>
pub fn into_string(self) -> Option<String>
Consumes this value, returning the inner string if it is a string.
Sourcepub fn into_array(self) -> Option<Array>
pub fn into_array(self) -> Option<Array>
Consumes this value, returning the inner array if it is an array.
Sourcepub fn into_object(self) -> Option<Object>
pub fn into_object(self) -> Option<Object>
Consumes this value, returning the inner object if it is an object.
Sourcepub fn traverse(&self) -> Traverse<'_> ⓘ
pub fn traverse(&self) -> Traverse<'_> ⓘ
Returns an iterator over every fragment of this value, in depth-first order, paired with its index.
The index of each fragment is its offset in the CodeMap produced
when the value was parsed.
Sourcepub fn count(&self, f: impl FnMut(usize, FragmentRef<'_>) -> bool) -> usize
pub fn count(&self, f: impl FnMut(usize, FragmentRef<'_>) -> bool) -> usize
Recursively count the number of values for which f returns true.
Sourcepub fn volume(&self) -> usize
pub fn volume(&self) -> usize
Returns the volume of the value.
The volume is the sum of all values and recursively nested values
included in self, including self (the volume is at least 1).
This is equivalent to value.traverse().filter(|(_, f)| f.is_value()).count().
Sourcepub fn canonicalize_with(&mut self, buffer: &mut Buffer)
Available on crate feature canonicalize only.
pub fn canonicalize_with(&mut self, buffer: &mut Buffer)
canonicalize only.Puts this JSON value in canonical form according to RFC 8785.
The given buffer is used to canonicalize the number values.
Sourcepub fn canonicalize(&mut self)
Available on crate feature canonicalize only.
pub fn canonicalize(&mut self)
canonicalize only.Puts this JSON value in canonical form according to RFC 8785.
For predictable performance in tight loops, use
Self::canonicalize_with with a caller-owned buffer.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Value
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl<'de> Deserializer<'de> for Value
Available on crate feature serde only.
impl<'de> Deserializer<'de> for Value
serde only.Source§type Error = DeserializeError
type Error = DeserializeError
Source§fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserializer to figure out how to drive the visitor based
on what data type is in the input. Read moreSource§fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting an i8 value.Source§fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting an i16 value.Source§fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting an i32 value.Source§fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting an i64 value.Source§fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Source§fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a u8 value.Source§fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a u16 value.Source§fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a u32 value.Source§fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a u64 value.Source§fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Source§fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a f32 value.Source§fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a f64 value.Source§fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting an optional value. Read moreSource§fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting an enum value with a
particular name and possible variants.Source§fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a newtype struct with a
particular name.Source§fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a bool value.Source§fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a char value.Source§fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer. Read moreSource§fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer. Read moreSource§fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer. Read moreSource§fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer. Read moreSource§fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a unit value.Source§fn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a unit struct with a
particular name.Source§fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a sequence of values.Source§fn deserialize_tuple<V>(
self,
_len: usize,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_tuple<V>(
self,
_len: usize,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a sequence of values and
knows how many values there are without looking at the serialized data.Source§fn deserialize_tuple_struct<V>(
self,
_name: &'static str,
_len: usize,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
_name: &'static str,
_len: usize,
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a tuple struct with a
particular name and number of fields.Source§fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a map of key-value pairs.Source§fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting a struct with a particular
name and fields.Source§fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type is expecting the name of a struct
field or the discriminant of an enum variant.Source§fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>where
V: Visitor<'de>,
Deserialize type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read moreSource§fn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Deserialize implementations should expect to
deserialize their human-readable form. Read moreimpl Eq for Value
Source§impl<'de> IntoDeserializer<'de, DeserializeError> for Value
Available on crate feature serde only.
impl<'de> IntoDeserializer<'de, DeserializeError> for Value
serde only.Source§type Deserializer = Value
type Deserializer = Value
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Source§impl Ord for Value
impl Ord for Value
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl Parse for Value
impl Parse for Value
Source§fn parse_str_with(
content: &str,
options: Options,
) -> Result<(Self, CodeMap), Error>
fn parse_str_with( content: &str, options: Options, ) -> Result<(Self, CodeMap), Error>
options.Source§fn parse_slice(content: &[u8]) -> Result<(Self, CodeMap), Error>
fn parse_slice(content: &[u8]) -> Result<(Self, CodeMap), Error>
Source§fn parse_slice_with(
content: &[u8],
options: Options,
) -> Result<(Self, CodeMap), Error>
fn parse_slice_with( content: &[u8], options: Options, ) -> Result<(Self, CodeMap), Error>
options.Source§fn parse_in<C, E>(
parser: &mut Parser<C, E>,
context: Context,
) -> Result<(Self, usize), Error<E>>
fn parse_in<C, E>( parser: &mut Parser<C, E>, context: Context, ) -> Result<(Self, usize), Error<E>>
Source§fn parse_infallible_utf8<C>(chars: C) -> Result<(Self, CodeMap), Error>
fn parse_infallible_utf8<C>(chars: C) -> Result<(Self, CodeMap), Error>
Source§fn parse_utf8_infallible_with<C>(
chars: C,
options: Options,
) -> Result<(Self, CodeMap), Error>
fn parse_utf8_infallible_with<C>( chars: C, options: Options, ) -> Result<(Self, CodeMap), Error>
options.Source§fn parse_utf8<C, E>(chars: C) -> Result<(Self, CodeMap), Error<E>>
fn parse_utf8<C, E>(chars: C) -> Result<(Self, CodeMap), Error<E>>
Source§fn parse_utf8_with<C, E>(
chars: C,
options: Options,
) -> Result<(Self, CodeMap), Error<E>>
fn parse_utf8_with<C, E>( chars: C, options: Options, ) -> Result<(Self, CodeMap), Error<E>>
options.Source§fn parse_infallible<C>(chars: C) -> Result<(Self, CodeMap), Error>where
C: Iterator<Item = DecodedChar>,
fn parse_infallible<C>(chars: C) -> Result<(Self, CodeMap), Error>where
C: Iterator<Item = DecodedChar>,
Source§fn parse_infallible_with<C>(
chars: C,
options: Options,
) -> Result<(Self, CodeMap), Error>where
C: Iterator<Item = DecodedChar>,
fn parse_infallible_with<C>(
chars: C,
options: Options,
) -> Result<(Self, CodeMap), Error>where
C: Iterator<Item = DecodedChar>,
options.Source§fn parse<C, E>(chars: C) -> Result<(Self, CodeMap), Error<E>>
fn parse<C, E>(chars: C) -> Result<(Self, CodeMap), Error<E>>
Source§impl PartialOrd for Value
impl PartialOrd for Value
Source§impl PrecomputeSize for Value
impl PrecomputeSize for Value
Source§impl Print for Value
impl Print for Value
Source§fn fmt_with(
&self,
f: &mut Formatter<'_>,
options: &Options,
indent: usize,
) -> Result
fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize, ) -> Result
f with the given options, starting at the given
indentation level.Source§fn pretty_print(&self) -> Printed<'_, Self>
fn pretty_print(&self) -> Printed<'_, Self>
Options::pretty options.Source§fn compact_print(&self) -> Printed<'_, Self>
fn compact_print(&self) -> Printed<'_, Self>
Options::compact options.Source§fn inline_print(&self) -> Printed<'_, Self>
fn inline_print(&self) -> Printed<'_, Self>
Options::inline options.Source§fn print_with(&self, options: Options) -> Printed<'_, Self>
fn print_with(&self, options: Options) -> Printed<'_, Self>
Source§impl PrintWithSize for Value
impl PrintWithSize for Value
impl StructuralPartialEq for Value
impl UnorderedEq for Value
Source§impl UnorderedPartialEq for Value
impl UnorderedPartialEq for Value
Source§fn unordered_eq(&self, other: &Self) -> bool
fn unordered_eq(&self, other: &Self) -> bool
self and other are equal modulo object entry order.Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Unordered reference.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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self is equivalent to key.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.