pub enum Any {
Null,
Undefined,
Bool(bool),
Number(f64),
BigInt(i64),
String(Arc<str>),
Buffer(Arc<[u8]>),
Array(Arc<[Any]>),
Map(Arc<HashMap<String, Any>>),
}Expand description
Any is an enum with a potentially associated value that is used to represent JSON values and supports efficient encoding of those values.
Variants§
Null
Undefined
Bool(bool)
Number(f64)
BigInt(i64)
String(Arc<str>)
Buffer(Arc<[u8]>)
Array(Arc<[Any]>)
Map(Arc<HashMap<String, Any>>)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Any
impl<'de> Deserialize<'de> for Any
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Any, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Any, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de, 'a> IntoDeserializer<'de, AnyDeserializeError> for &'a Anywhere
'a: 'de,
impl<'de, 'a> IntoDeserializer<'de, AnyDeserializeError> for &'a Anywhere
'a: 'de,
Source§type Deserializer = AnyDeserializer<'de>
type Deserializer = AnyDeserializer<'de>
The type of the deserializer being converted into.
Source§fn into_deserializer(
self,
) -> <&'a Any as IntoDeserializer<'de, AnyDeserializeError>>::Deserializer
fn into_deserializer( self, ) -> <&'a Any as IntoDeserializer<'de, AnyDeserializeError>>::Deserializer
Convert this value into a deserializer.
Source§impl Serialize for Any
impl Serialize for Any
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Any
Auto Trait Implementations§
impl Freeze for Any
impl RefUnwindSafe for Any
impl Send for Any
impl Sync for Any
impl Unpin for Any
impl UnwindSafe for Any
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Prelim for T
impl<T> Prelim for T
Source§fn into_content(self, _txn: &mut TransactionMut<'_>) -> (ItemContent, Option<T>)
fn into_content(self, _txn: &mut TransactionMut<'_>) -> (ItemContent, Option<T>)
This method is used to create initial content required in order to create a block item.
A supplied
ptr can be used to identify block that is about to be created to store
the returned content. Read moreSource§fn integrate(self, _txn: &mut TransactionMut<'_>, _inner_ref: BranchPtr)
fn integrate(self, _txn: &mut TransactionMut<'_>, _inner_ref: BranchPtr)
Method called once an original item filled with content from Self::into_content has been
added to block store. This method is used by complex types such as maps or arrays to append
the original contents of prelim struct into YMap, YArray etc.
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.