[−][src]Struct scale_info::Type
A Type
definition with optional metadata.
Implementations
impl Type
[src]
pub fn builder() -> TypeBuilder
[src]
Create a TypeBuilder
the public API for constructing a Type
impl<T> Type<T> where
T: Form,
[src]
T: Form,
pub fn path(&self) -> &Path<T>
[src]
Returns the path of the type
pub fn type_params(&self) -> &[T::Type]ⓘ
[src]
Returns the generic type parameters of the type
pub fn type_def(&self) -> &TypeDef<T>
[src]
Returns the definition of the type
Trait Implementations
impl<T: Clone + Form> Clone for Type<T> where
T::Type: Clone,
[src]
T::Type: Clone,
impl<T: Debug + Form> Debug for Type<T> where
T::Type: Debug,
[src]
T::Type: Debug,
impl<T: Form> Decode for Type<T> where
Path<T>: Decode,
Path<T>: Decode,
Vec<T::Type>: Decode,
Vec<T::Type>: Decode,
TypeDef<T>: Decode,
TypeDef<T>: Decode,
[src]
Path<T>: Decode,
Path<T>: Decode,
Vec<T::Type>: Decode,
Vec<T::Type>: Decode,
TypeDef<T>: Decode,
TypeDef<T>: Decode,
fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
[src]
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
impl<'de, T: Form> Deserialize<'de> for Type<T> where
T::Type: DeserializeOwned,
T::String: DeserializeOwned,
[src]
T::Type: DeserializeOwned,
T::String: DeserializeOwned,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T: Form> Encode for Type<T> where
Path<T>: Encode,
Path<T>: Encode,
Vec<T::Type>: Encode,
Vec<T::Type>: Encode,
TypeDef<T>: Encode,
TypeDef<T>: Encode,
[src]
Path<T>: Encode,
Path<T>: Encode,
Vec<T::Type>: Encode,
Vec<T::Type>: Encode,
TypeDef<T>: Encode,
TypeDef<T>: Encode,
fn encode_to<__CodecOutputEdqy: Output>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
[src]
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn size_hint(&self) -> usize
[src]
fn encode(&self) -> Vec<u8>ⓘ
[src]
fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
[src]
F: FnOnce(&[u8]) -> R,
impl<T: Form> EncodeLike<Type<T>> for Type<T> where
Path<T>: Encode,
Path<T>: Encode,
Vec<T::Type>: Encode,
Vec<T::Type>: Encode,
TypeDef<T>: Encode,
TypeDef<T>: Encode,
[src]
Path<T>: Encode,
Path<T>: Encode,
Vec<T::Type>: Encode,
Vec<T::Type>: Encode,
TypeDef<T>: Encode,
TypeDef<T>: Encode,
impl<T: Eq + Form> Eq for Type<T> where
T::Type: Eq,
[src]
T::Type: Eq,
impl<T: Form> From<(Path<T>, Vec<<T as Form>::Type>, TypeDef<T>)> for Type<T>
[src]
impl From<TypeDefArray<MetaForm>> for Type
[src]
fn from(array: TypeDefArray) -> Self
[src]
impl From<TypeDefPrimitive> for Type
[src]
fn from(primitive: TypeDefPrimitive) -> Self
[src]
impl From<TypeDefSequence<MetaForm>> for Type
[src]
fn from(sequence: TypeDefSequence) -> Self
[src]
impl From<TypeDefTuple<MetaForm>> for Type
[src]
fn from(tuple: TypeDefTuple) -> Self
[src]
impl IntoCompact for Type
[src]
type Output = Type<CompactForm>
The compact version of Self
.
fn into_compact(self, registry: &mut Registry) -> Self::Output
[src]
impl<T: Ord + Form> Ord for Type<T> where
T::Type: Ord,
[src]
T::Type: Ord,
fn cmp(&self, other: &Type<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq + Form> PartialEq<Type<T>> for Type<T> where
T::Type: PartialEq,
[src]
T::Type: PartialEq,
impl<T: PartialOrd + Form> PartialOrd<Type<T>> for Type<T> where
T::Type: PartialOrd,
[src]
T::Type: PartialOrd,
fn partial_cmp(&self, other: &Type<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Type<T>) -> bool
[src]
fn le(&self, other: &Type<T>) -> bool
[src]
fn gt(&self, other: &Type<T>) -> bool
[src]
fn ge(&self, other: &Type<T>) -> bool
[src]
impl<T: Form> Serialize for Type<T> where
T::Type: Serialize,
T::String: Serialize,
[src]
T::Type: Serialize,
T::String: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T: Form> StructuralEq for Type<T>
[src]
impl<T: Form> StructuralPartialEq for Type<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Type<T> where
<T as Form>::String: RefUnwindSafe,
<T as Form>::Type: RefUnwindSafe,
<T as Form>::String: RefUnwindSafe,
<T as Form>::Type: RefUnwindSafe,
impl<T> Send for Type<T> where
<T as Form>::String: Send,
<T as Form>::Type: Send,
<T as Form>::String: Send,
<T as Form>::Type: Send,
impl<T> Sync for Type<T> where
<T as Form>::String: Sync,
<T as Form>::Type: Sync,
<T as Form>::String: Sync,
<T as Form>::Type: Sync,
impl<T> Unpin for Type<T> where
<T as Form>::String: Unpin,
<T as Form>::Type: Unpin,
<T as Form>::String: Unpin,
<T as Form>::Type: Unpin,
impl<T> UnwindSafe for Type<T> where
<T as Form>::String: UnwindSafe,
<T as Form>::Type: UnwindSafe,
<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,
fn borrow(&self) -> &TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<S> Codec for S where
S: Encode + Decode,
[src]
S: Encode + Decode,
impl<T, X> Decode for X where
T: Decode + Into<X>,
X: WrapperTypeDecode<Wrapped = T>,
[src]
T: Decode + Into<X>,
X: WrapperTypeDecode<Wrapped = T>,
impl<T> DecodeAll for T where
T: Decode,
[src]
T: Decode,
impl<T> DecodeLimit for T where
T: Decode,
[src]
T: Decode,
fn decode_all_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
[src]
fn decode_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T, X> Encode for X where
T: Encode + ?Sized,
X: WrapperTypeEncode<Target = T>,
[src]
T: Encode + ?Sized,
X: WrapperTypeEncode<Target = T>,
fn size_hint(&self) -> usize
[src]
fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
[src]
F: FnOnce(&[u8]) -> R,
fn encode(&self) -> Vec<u8>ⓘ
[src]
fn encode_to<W>(&self, dest: &mut W) where
W: Output,
[src]
W: Output,
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>> 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.
fn to_owned(&self) -> T
[src]
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.
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>,