Struct scrypto::prelude::radix_engine_common::prelude::representations::serde_serialization::SerializationContext
source · pub struct SerializationContext<'s, 'a, E>where
E: SerializableCustomExtension,{
pub schema: &'s SchemaV1<<E as CustomExtension>::CustomSchema>,
pub mode: SerializationMode,
pub custom_context: <E as FormattableCustomExtension>::CustomDisplayContext<'a>,
}
Fields§
§schema: &'s SchemaV1<<E as CustomExtension>::CustomSchema>
§mode: SerializationMode
§custom_context: <E as FormattableCustomExtension>::CustomDisplayContext<'a>
Trait Implementations§
source§impl<'s, 'a, E> Clone for SerializationContext<'s, 'a, E>where
E: Clone + SerializableCustomExtension,
<E as CustomExtension>::CustomSchema: Clone,
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: Clone,
impl<'s, 'a, E> Clone for SerializationContext<'s, 'a, E>where
E: Clone + SerializableCustomExtension,
<E as CustomExtension>::CustomSchema: Clone,
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: Clone,
source§fn clone(&self) -> SerializationContext<'s, 'a, E>
fn clone(&self) -> SerializationContext<'s, 'a, E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'t, 'de, 's1, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableArrayElements<'t, 'de, 's1, E>where
E: SerializableCustomExtension,
impl<'t, 'de, 's1, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableArrayElements<'t, 'de, 's1, E>where
E: SerializableCustomExtension,
source§fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
Serializes the value to the given
serde::Serializer
, making use of the provided context.
See also contextual_serialize
, which takes a &Context
instead of an Into<Context>
. Read more§fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
Returns an object implementing
serde::Serialize
, which can be passed to serde
functions.source§impl<'t, 'de, 's1, 's2, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableFields<'t, 'de, 's1, 's2, E>where
E: SerializableCustomExtension,
impl<'t, 'de, 's1, 's2, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableFields<'t, 'de, 's1, 's2, E>where
E: SerializableCustomExtension,
source§fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
Serializes the value to the given
serde::Serializer
, making use of the provided context.
See also contextual_serialize
, which takes a &Context
instead of an Into<Context>
. Read more§fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
Returns an object implementing
serde::Serialize
, which can be passed to serde
functions.source§impl<'t, 'de, 's1, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableMapElements<'t, 'de, 's1, E>where
E: SerializableCustomExtension,
impl<'t, 'de, 's1, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableMapElements<'t, 'de, 's1, E>where
E: SerializableCustomExtension,
source§fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
Serializes the value to the given
serde::Serializer
, making use of the provided context.
See also contextual_serialize
, which takes a &Context
instead of an Into<Context>
. Read more§fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
Returns an object implementing
serde::Serialize
, which can be passed to serde
functions.source§impl<'t, 'de, 's1, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableMapEntry<'t, 'de, 's1, E>where
E: SerializableCustomExtension,
impl<'t, 'de, 's1, 's, 'a, E> ContextualSerialize<SerializationContext<'s, 'a, E>> for SerializableMapEntry<'t, 'de, 's1, E>where
E: SerializableCustomExtension,
source§fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s, 'a, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
Serializes the value to the given
serde::Serializer
, making use of the provided context.
See also contextual_serialize
, which takes a &Context
instead of an Into<Context>
. Read more§fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
Returns an object implementing
serde::Serialize
, which can be passed to serde
functions.source§impl<'a, 'a2, 't, 'de, 's1, 's2, E> ContextualSerialize<SerializationContext<'s2, 'a2, E>> for SerializableType<'a, 't, 'de, 's1, 's2, E>where
E: SerializableCustomExtension,
impl<'a, 'a2, 't, 'de, 's1, 's2, E> ContextualSerialize<SerializationContext<'s2, 'a2, E>> for SerializableType<'a, 't, 'de, 's1, 's2, E>where
E: SerializableCustomExtension,
source§fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s2, 'a2, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn contextual_serialize<S>(
&self,
serializer: S,
context: &SerializationContext<'s2, 'a2, E>
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
fn serialize<S, TContext>(
&self,
serializer: S,
context: TContext
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
TContext: Into<Context>,
Serializes the value to the given
serde::Serializer
, making use of the provided context.
See also contextual_serialize
, which takes a &Context
instead of an Into<Context>
. Read more§fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
fn serializable<TContext, 'a, 'b>(
&'a self,
context: TContext
) -> ContextSerializable<'a, Self, Context>where
TContext: Into<Context>,
Returns an object implementing
serde::Serialize
, which can be passed to serde
functions.source§impl<'s, 'a, E> Debug for SerializationContext<'s, 'a, E>where
E: Debug + SerializableCustomExtension,
<E as CustomExtension>::CustomSchema: Debug,
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: Debug,
impl<'s, 'a, E> Debug for SerializationContext<'s, 'a, E>where
E: Debug + SerializableCustomExtension,
<E as CustomExtension>::CustomSchema: Debug,
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: Debug,
impl<'s, 'a, E> Copy for SerializationContext<'s, 'a, E>where
E: Copy + SerializableCustomExtension,
<E as CustomExtension>::CustomSchema: Copy,
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: Copy,
Auto Trait Implementations§
impl<'s, 'a, E> RefUnwindSafe for SerializationContext<'s, 'a, E>where
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: RefUnwindSafe,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeKind<LocalTypeId>: RefUnwindSafe,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeValidation: RefUnwindSafe,
impl<'s, 'a, E> Send for SerializationContext<'s, 'a, E>where
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: Send,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeKind<LocalTypeId>: Sync,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeValidation: Sync,
impl<'s, 'a, E> Sync for SerializationContext<'s, 'a, E>where
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: Sync,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeKind<LocalTypeId>: Sync,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeValidation: Sync,
impl<'s, 'a, E> Unpin for SerializationContext<'s, 'a, E>
impl<'s, 'a, E> UnwindSafe for SerializationContext<'s, 'a, E>where
<E as FormattableCustomExtension>::CustomDisplayContext<'a>: UnwindSafe,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeKind<LocalTypeId>: RefUnwindSafe,
<<E as CustomExtension>::CustomSchema as CustomSchema>::CustomTypeValidation: RefUnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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