Enum scale_serialization::SpecificType
source · [−]pub enum SpecificType {
}
Expand description
A convenient representation of the scale-info types to a format that matches serde model more closely
Variants
Bool
U8
U16
U32
U64
U128
I8
I16
I32
I64
I128
Char
Str
Bytes(u32)
Sequence(u32)
Map(u32, u32)
Tuple(TupleOrArray)
Struct(Vec<(String, u32)>)
StructUnit
StructNewType(u32)
StructTuple(Vec<u32>)
Variant(String, Vec<Variant<Portable>>, Option<u8>)
Trait Implementations
sourceimpl Clone for SpecificType
impl Clone for SpecificType
sourcefn clone(&self) -> SpecificType
fn clone(&self) -> SpecificType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SpecificType
impl Debug for SpecificType
sourceimpl Encode for SpecificType
impl Encode for SpecificType
sourcefn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
Convert self to a slice and append it to the destination.
sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
sourcefn encode(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Convert self to an owned vector.
sourcefn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
sourceimpl From<(&'_ Type<PortableForm>, &'_ PortableRegistry)> for SpecificType
impl From<(&'_ Type<PortableForm>, &'_ PortableRegistry)> for SpecificType
sourceimpl Serialize for SpecificType
impl Serialize for SpecificType
impl EncodeLike<SpecificType> for SpecificType
Auto Trait Implementations
impl RefUnwindSafe for SpecificType
impl Send for SpecificType
impl Sync for SpecificType
impl Unpin for SpecificType
impl UnwindSafe for SpecificType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more