Struct fourleaf::adapt::Copied
[−]
[src]
pub struct Copied<T>(pub T);
Causes the inner type to be deserialised with the Copying
style
regardless of the overarching deserialisation style.
Trait Implementations
impl<T: Debug> Debug for Copied<T>
[src]
impl<T: Default> Default for Copied<T>
[src]
impl<T: Copy> Copy for Copied<T>
[src]
impl<T: Clone> Clone for Copied<T>
[src]
fn clone(&self) -> Copied<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for Copied<T>
[src]
fn eq(&self, __arg_0: &Copied<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Copied<T>) -> bool
This method tests for !=
.
impl<T: Eq> Eq for Copied<T>
[src]
impl<T: PartialOrd> PartialOrd for Copied<T>
[src]
fn partial_cmp(&self, __arg_0: &Copied<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Copied<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Copied<T>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Copied<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Copied<T>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Ord> Ord for Copied<T>
[src]
fn cmp(&self, __arg_0: &Copied<T>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl<T: Hash> Hash for Copied<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Serialize> SerializeAs for Copied<T>
[src]
type T = T
The actual type to serialise.
fn serialize_as(&self) -> &T
Returns the value to be serialised in lieu of self
.
impl<T, R: Read, STYLE> Deserialize<R, STYLE> for Copied<T> where
T: Deserialize<R, Copying>,
[src]
T: Deserialize<R, Copying>,
type Accum = T::Accum
Type used to accumulate the deserialised value of this field. Read more
fn deserialize_body(context: &Context, stream: &mut Stream<R>) -> Result<Self>
Deserialises this type from a top-level stream or from the tail portion of a struct. If this call succeeds, all field elements up to and including the closing EndOfStruct
element are consumed. Read more
fn deserialize_field(
accum: &mut T::Accum,
context: &Context,
field: &mut Field<R>
) -> Result<()>
accum: &mut T::Accum,
context: &Context,
field: &mut Field<R>
) -> Result<()>
Deserialises this type from a field in a container. Read more
fn deserialize_element(context: &Context, field: &mut Field<R>) -> Result<Self>
Deserialises this type from a single field entry, which is known to be the only occurrence that would constitute this value. Read more
fn finish(accum: T::Accum, context: &Context) -> Result<Self>
Convert an accumulated value to a value of this type. Read more
fn serialized_as_slice() -> bool
Returns whether deserialize_vec
and the deserialize_array_*
methods return non-None. Read more
fn deserialize_vec(
context: &Context,
field: &mut Field<R>
) -> Option<Result<Vec<Self>>>
context: &Context,
field: &mut Field<R>
) -> Option<Result<Vec<Self>>>
If this type's Serialize
implementation has special behaviour in serialize_slice
, perform the reverse operation here and return a Vec
of values. Read more
fn deserialize_slice(
dst: &mut [Self],
context: &Context,
field: &mut Field<R>
) -> Option<Result<()>>
dst: &mut [Self],
context: &Context,
field: &mut Field<R>
) -> Option<Result<()>>
If this type's Serialize
implementation has special behaviour in serialize_slice
, perform the reverse operation here and write into the given slice of values, or return Err
if the slice is not the appropriate length. Read more
fn deserialize_array_0(
context: &Context,
field: &mut Field<R>
) -> Option<Result<[Self; 0]>>
context: &Context,
field: &mut Field<R>
) -> Option<Result<[Self; 0]>>
If this type's Serialize
implementation has special behaviour in serialize_slice
, perform the reverse operation here return an array of the given length, or return an error if the actual number of values is different from the length of the array. Read more