Reflection

Trait Reflection 

Source
pub trait Reflection {
    // Required method
    fn schema(id: &'static str) -> Tree<Member>;

    // Provided methods
    fn ty() -> Type { ... }
    fn name() -> Option<String> { ... }
    fn members() -> Forest<Member> { ... }
    fn schemata() -> Tree<Member> { ... }
}
Expand description

Reflects type’s fields’ names and their type names.

Required Methods§

Source

fn schema(id: &'static str) -> Tree<Member>

Reflects field name, its type name and its members, by a tree of degree 1.

Provided Methods§

Source

fn ty() -> Type

Returns type construct.

Source

fn name() -> Option<String>

Returns type name.

Source

fn members() -> Forest<Member>

Reflects members’ schema() by a forest of degree 1.

Source

fn schemata() -> Tree<Member>

Reflects type’s fields’ names and their type names, by expanding schema() recursively.

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 Reflection for bool

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for f32

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for f64

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for i8

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for i16

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for i32

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for i64

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for i128

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for u8

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for u16

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for u32

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for u64

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for u128

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for ()

Source§

fn ty() -> Type

Source§

fn name() -> Option<String>

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl Reflection for String

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

impl<'a> Reflection for &'a str

Source§

fn ty() -> Type

Source§

fn schema(id: &'static str) -> Tree<Member>

Source§

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

Source§

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

Source§

impl<K, V> Reflection for BTreeMap<K, V>
where K: Reflection, V: Reflection,

Source§

impl<K, V> Reflection for HashMap<K, V>
where K: Reflection, V: Reflection,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T> Reflection for [T; 1]
where T: Reflection,

Source§

impl<T> Reflection for [T; 2]
where T: Reflection,

Source§

impl<T> Reflection for [T; 3]
where T: Reflection,

Source§

impl<T> Reflection for [T; 4]
where T: Reflection,

Source§

impl<T> Reflection for [T; 5]
where T: Reflection,

Source§

impl<T> Reflection for [T; 6]
where T: Reflection,

Source§

impl<T> Reflection for [T; 7]
where T: Reflection,

Source§

impl<T> Reflection for [T; 8]
where T: Reflection,

Source§

impl<T> Reflection for [T; 9]
where T: Reflection,

Source§

impl<T> Reflection for [T; 10]
where T: Reflection,

Source§

impl<T> Reflection for [T; 11]
where T: Reflection,

Source§

impl<T> Reflection for [T; 12]
where T: Reflection,

Source§

impl<T> Reflection for [T; 13]
where T: Reflection,

Source§

impl<T> Reflection for [T; 14]
where T: Reflection,

Source§

impl<T> Reflection for [T; 15]
where T: Reflection,

Source§

impl<T> Reflection for [T; 16]
where T: Reflection,

Source§

impl<T> Reflection for [T; 17]
where T: Reflection,

Source§

impl<T> Reflection for [T; 18]
where T: Reflection,

Source§

impl<T> Reflection for [T; 19]
where T: Reflection,

Source§

impl<T> Reflection for [T; 20]
where T: Reflection,

Source§

impl<T> Reflection for [T; 21]
where T: Reflection,

Source§

impl<T> Reflection for [T; 22]
where T: Reflection,

Source§

impl<T> Reflection for [T; 23]
where T: Reflection,

Source§

impl<T> Reflection for [T; 24]
where T: Reflection,

Source§

impl<T> Reflection for [T; 25]
where T: Reflection,

Source§

impl<T> Reflection for [T; 26]
where T: Reflection,

Source§

impl<T> Reflection for [T; 27]
where T: Reflection,

Source§

impl<T> Reflection for [T; 28]
where T: Reflection,

Source§

impl<T> Reflection for [T; 29]
where T: Reflection,

Source§

impl<T> Reflection for [T; 30]
where T: Reflection,

Source§

impl<T> Reflection for [T; 31]
where T: Reflection,

Source§

impl<T> Reflection for [T; 32]
where T: Reflection,

Source§

impl<T> Reflection for *const T
where T: Reflection + ?Sized,

Source§

impl<T> Reflection for *mut T
where T: Reflection + ?Sized,

Source§

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

Source§

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

Source§

impl<T> Reflection for BTreeSet<T>
where T: Reflection,

Source§

impl<T> Reflection for Rc<T>
where T: Reflection + ?Sized,

Source§

impl<T> Reflection for Vec<T>
where T: Reflection,

Source§

impl<T> Reflection for Range<T>
where T: Reflection,

Source§

impl<T> Reflection for NonNull<T>
where T: Reflection + ?Sized,

Source§

impl<T> Reflection for HashSet<T>
where T: Reflection,

Source§

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

Implementors§