pub trait ReflectStruct: Sync + Send + Debug {
    fn name(&self) -> &'static str;
fn infos(&self) -> Vec<(&'static str, Option<&'static str>)>;
fn get_value(&self, name: &str) -> Option<Value>; fn names(&self) -> Vec<&'static str> { ... }
fn descriptions(&self) -> Vec<Option<&'static str>> { ... }
fn attributes(&self) -> Vec<Attribute> { ... }
fn count(&self) -> usize { ... } }
Expand description

ReflectStruct is a trait used to wrapper a struct and give dynamic reflection information and access to the value of their a members.

Required methods

Return the name of the ReflectStruct.

Return a tuple containing the name and description of each field of the ReflectStruct.

Return field name Value.

Provided methods

Return name of all the member field of the struct.

Return description of all the member field of the struct.

Return a Vector of Attribute containing a tuple name, value, description of the all the field of the struct. If ReflectStruct bind function, the function will be called to get the resulting Value.

Return the number of field in the Struct.

Trait Implementations

Serialize this value into the given Serde serializer. Read more

Implementors