Trait candid::types::CandidType

source ·
pub trait CandidType {
    // Required methods
    fn _ty() -> Type;
    fn idl_serialize<S>(&self, serializer: S) -> Result<(), S::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::Error>
where S: Serializer,

Provided Methods§

source

fn ty() -> Type

source

fn id() -> TypeId

Object Safety§

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::Error>
where S: Serializer,

source§

impl CandidType for f32

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for f64

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for i8

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for i16

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for i32

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for i64

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for i128

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for isize

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for str

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for u8

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for u16

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for u32

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for u64

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for u128

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for ()

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for usize

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for String

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for Duration

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for Path

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for PathBuf

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for SystemTime

source§

fn _ty() -> Type

source§

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

source§

impl CandidType for ByteBuf

Available on crate feature serde_bytes only.
source§

fn _ty() -> Type

source§

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

source§

impl CandidType for Bytes

Available on crate feature serde_bytes only.
source§

fn _ty() -> Type

source§

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

source§

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

source§

fn _ty() -> Type

source§

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

source§

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

source§

fn id() -> TypeId

source§

fn _ty() -> Type

source§

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

source§

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

source§

fn id() -> TypeId

source§

fn _ty() -> Type

source§

fn idl_serialize<S>(&self, serializer: S) -> Result<(), S::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::Error>
where S: Serializer,

source§

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

source§

fn _ty() -> Type

source§

fn idl_serialize<S>(&self, serializer: S) -> Result<(), S::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::Error>
where S: Serializer,

source§

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

source§

fn _ty() -> Type

source§

fn idl_serialize<S>(&self, serializer: S) -> Result<(), S::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::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::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::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::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::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::Error>
where S: Serializer,

source§

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

source§

fn _ty() -> Type

source§

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

Implementors§