CandidType

Trait CandidType 

Source
pub trait CandidType {
    // Required methods
    fn _ty() -> Type;
    fn idl_serialize<S>(
        &self,
        serializer: S,
    ) -> Result<(), <S as Serializer>::Error>
       where S: Serializer;

    // Provided methods
    fn ty() -> Type { ... }
    fn id() -> TypeId { ... }
}

Required Methods§

Source

fn _ty() -> Type

Source

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Provided Methods§

Source

fn ty() -> Type

Source

fn id() -> TypeId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CandidType for bool

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for f32

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for f64

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for i8

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for i16

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for i32

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for i64

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for i128

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for isize

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for str

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for u8

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for u16

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for u32

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for u64

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for u128

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for ()

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for usize

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for String

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for Duration

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for Path

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for PathBuf

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for SystemTime

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for ByteBuf

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl CandidType for Bytes

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K> CandidType for BinaryHeap<K>
where K: CandidType + Ord,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K> CandidType for BTreeSet<K>
where K: CandidType + Ord,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K> CandidType for LinkedList<K>
where K: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K> CandidType for VecDeque<K>
where K: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K> CandidType for Vec<K>
where K: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K, H> CandidType for HashSet<K, H>
where K: CandidType + Eq + Hash, H: BuildHasher,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K, V> CandidType for BTreeMap<K, V>
where K: CandidType + Ord, V: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<K, V, H> CandidType for HashMap<K, V, H>
where K: CandidType + Eq + Hash, V: CandidType, H: BuildHasher,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0> CandidType for (T0,)
where T0: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1> CandidType for (T0, T1)
where T0: CandidType, T1: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2> CandidType for (T0, T1, T2)
where T0: CandidType, T1: CandidType, T2: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3> CandidType for (T0, T1, T2, T3)
where T0: CandidType, T1: CandidType, T2: CandidType, T3: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4> CandidType for (T0, T1, T2, T3, T4)
where T0: CandidType, T1: CandidType, T2: CandidType, T3: CandidType, T4: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5> CandidType for (T0, T1, T2, T3, T4, T5)
where T0: CandidType, T1: CandidType, T2: CandidType, T3: CandidType, T4: CandidType, T5: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6> CandidType for (T0, T1, T2, T3, T4, T5, T6)
where T0: CandidType, T1: CandidType, T2: CandidType, T3: CandidType, T4: CandidType, T5: CandidType, T6: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
where T0: CandidType, T1: CandidType, T2: CandidType, T3: CandidType, T4: CandidType, T5: CandidType, T6: CandidType, T7: CandidType, T8: CandidType, T9: CandidType, T10: CandidType, T11: CandidType, T12: CandidType, T13: CandidType, T14: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> CandidType for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T0: CandidType, T1: CandidType, T2: CandidType, T3: CandidType, T4: CandidType, T5: CandidType, T6: CandidType, T7: CandidType, T8: CandidType, T9: CandidType, T10: CandidType, T11: CandidType, T12: CandidType, T13: CandidType, T14: CandidType, T15: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for Cow<'_, T>
where T: CandidType + ToOwned + ?Sized,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for Option<T>
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for &T
where T: CandidType + ?Sized,

Source§

fn id() -> TypeId

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for &mut T
where T: CandidType + ?Sized,

Source§

fn id() -> TypeId

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for [T]
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for Box<T>
where T: CandidType + ?Sized,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for Rc<T>
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for Arc<T>
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for Cell<T>
where T: CandidType + Copy,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for RefCell<T>
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for Reverse<T>
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T> CandidType for PhantomData<T>
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>(&self, _: S) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T, E> CandidType for Result<T, E>
where T: CandidType, E: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<T, const N: usize> CandidType for [T; N]
where T: CandidType,

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Source§

impl<const N: usize> CandidType for ByteArray<N>

Source§

fn _ty() -> Type

Source§

fn idl_serialize<S>( &self, serializer: S, ) -> Result<(), <S as Serializer>::Error>
where S: Serializer,

Implementors§