[−][src]Enum scale_info::TypeDef
The possible types a SCALE encodable Rust value could have.
Variants
Composite(TypeDefComposite<T>)
A composite type (e.g. a struct or a tuple)
Variant(TypeDefVariant<T>)
A variant type (e.g. an enum)
Sequence(TypeDefSequence<T>)
A sequence type with runtime known length.
Array(TypeDefArray<T>)
An array type with compile-time known length.
Tuple(TypeDefTuple<T>)
A tuple type.
Primitive(TypeDefPrimitive)
A Rust primitive type.
Phantom(TypeDefPhantom<T>)
A PhantomData type.
Trait Implementations
impl<T: Clone + Form> Clone for TypeDef<T>
[src]
impl<T: Debug + Form> Debug for TypeDef<T>
[src]
impl<T: Form> Decode for TypeDef<T> where
TypeDefComposite<T>: Decode,
TypeDefComposite<T>: Decode,
TypeDefVariant<T>: Decode,
TypeDefVariant<T>: Decode,
TypeDefSequence<T>: Decode,
TypeDefSequence<T>: Decode,
TypeDefArray<T>: Decode,
TypeDefArray<T>: Decode,
TypeDefTuple<T>: Decode,
TypeDefTuple<T>: Decode,
TypeDefPhantom<T>: Decode,
TypeDefPhantom<T>: Decode,
[src]
TypeDefComposite<T>: Decode,
TypeDefComposite<T>: Decode,
TypeDefVariant<T>: Decode,
TypeDefVariant<T>: Decode,
TypeDefSequence<T>: Decode,
TypeDefSequence<T>: Decode,
TypeDefArray<T>: Decode,
TypeDefArray<T>: Decode,
TypeDefTuple<T>: Decode,
TypeDefTuple<T>: Decode,
TypeDefPhantom<T>: Decode,
TypeDefPhantom<T>: Decode,
fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
[src]
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
pub fn skip<I>(input: &mut I) -> Result<(), Error> where
I: Input,
[src]
I: Input,
pub fn encoded_fixed_size() -> Option<usize>
[src]
impl<T: Form> Encode for TypeDef<T> where
TypeDefComposite<T>: Encode,
TypeDefComposite<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefPhantom<T>: Encode,
TypeDefPhantom<T>: Encode,
[src]
TypeDefComposite<T>: Encode,
TypeDefComposite<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefPhantom<T>: Encode,
TypeDefPhantom<T>: Encode,
fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
[src]
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
pub fn size_hint(&self) -> usize
[src]
pub fn encode(&self) -> Vec<u8, Global>ⓘ
[src]
pub fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
[src]
F: FnOnce(&[u8]) -> R,
pub fn encoded_size(&self) -> usize
[src]
impl<T: Form> EncodeLike<TypeDef<T>> for TypeDef<T> where
TypeDefComposite<T>: Encode,
TypeDefComposite<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefPhantom<T>: Encode,
TypeDefPhantom<T>: Encode,
[src]
TypeDefComposite<T>: Encode,
TypeDefComposite<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefVariant<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefSequence<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefArray<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefTuple<T>: Encode,
TypeDefPhantom<T>: Encode,
TypeDefPhantom<T>: Encode,
impl<T: Eq + Form> Eq for TypeDef<T>
[src]
impl<T: Form> From<TypeDefArray<T>> for TypeDef<T>
[src]
fn from(original: TypeDefArray<T>) -> TypeDef<T>
[src]
impl<T: Form> From<TypeDefComposite<T>> for TypeDef<T>
[src]
fn from(original: TypeDefComposite<T>) -> TypeDef<T>
[src]
impl<T: Form> From<TypeDefPhantom<T>> for TypeDef<T>
[src]
fn from(original: TypeDefPhantom<T>) -> TypeDef<T>
[src]
impl<T: Form> From<TypeDefPrimitive> for TypeDef<T>
[src]
fn from(original: TypeDefPrimitive) -> TypeDef<T>
[src]
impl<T: Form> From<TypeDefSequence<T>> for TypeDef<T>
[src]
fn from(original: TypeDefSequence<T>) -> TypeDef<T>
[src]
impl<T: Form> From<TypeDefTuple<T>> for TypeDef<T>
[src]
fn from(original: TypeDefTuple<T>) -> TypeDef<T>
[src]
impl<T: Form> From<TypeDefVariant<T>> for TypeDef<T>
[src]
fn from(original: TypeDefVariant<T>) -> TypeDef<T>
[src]
impl IntoPortable for TypeDef
[src]
type Output = TypeDef<PortableForm>
The portable version of Self
.
fn into_portable(self, registry: &mut Registry) -> Self::Output
[src]
impl<T: Ord + Form> Ord for TypeDef<T>
[src]
fn cmp(&self, other: &TypeDef<T>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<T: PartialEq + Form> PartialEq<TypeDef<T>> for TypeDef<T>
[src]
impl<T: PartialOrd + Form> PartialOrd<TypeDef<T>> for TypeDef<T>
[src]
fn partial_cmp(&self, other: &TypeDef<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &TypeDef<T>) -> bool
[src]
fn le(&self, other: &TypeDef<T>) -> bool
[src]
fn gt(&self, other: &TypeDef<T>) -> bool
[src]
fn ge(&self, other: &TypeDef<T>) -> bool
[src]
impl<T: Form> StructuralEq for TypeDef<T>
[src]
impl<T: Form> StructuralPartialEq for TypeDef<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for TypeDef<T> where
<T as Form>::String: RefUnwindSafe,
<T as Form>::Type: RefUnwindSafe,
[src]
<T as Form>::String: RefUnwindSafe,
<T as Form>::Type: RefUnwindSafe,
impl<T> Send for TypeDef<T> where
<T as Form>::String: Send,
<T as Form>::Type: Send,
[src]
<T as Form>::String: Send,
<T as Form>::Type: Send,
impl<T> Sync for TypeDef<T> where
<T as Form>::String: Sync,
<T as Form>::Type: Sync,
[src]
<T as Form>::String: Sync,
<T as Form>::Type: Sync,
impl<T> Unpin for TypeDef<T> where
<T as Form>::String: Unpin,
<T as Form>::Type: Unpin,
[src]
<T as Form>::String: Unpin,
<T as Form>::Type: Unpin,
impl<T> UnwindSafe for TypeDef<T> where
<T as Form>::String: UnwindSafe,
<T as Form>::Type: UnwindSafe,
[src]
<T as Form>::String: UnwindSafe,
<T as Form>::Type: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<S> Codec for S where
S: Encode + Decode,
[src]
S: Encode + Decode,
impl<T> DecodeAll for T where
T: Decode,
[src]
T: Decode,
impl<T> DecodeLimit for T where
T: Decode,
[src]
T: Decode,
pub fn decode_all_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
[src]
pub fn decode_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
[src]
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Box<T, Global>> for T where
T: Encode,
[src]
T: Encode,
impl<'a, T> EncodeLike<Cow<'a, T>> for T where
T: Encode + ToOwned,
[src]
T: Encode + ToOwned,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<T> From<T> for T
[src]
impl<S> FullCodec for S where
S: Decode + FullEncode,
[src]
S: Decode + FullEncode,
impl<S> FullEncode for S where
S: Encode + EncodeLike<S>,
[src]
S: Encode + EncodeLike<S>,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> KeyedVec for T where
T: Codec,
[src]
T: Codec,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,