Skip to main content

ObjectType

Trait ObjectType 

Source
pub trait ObjectType {
    // Required methods
    fn field_names(
        mode: SchemaMode,
        seen: &mut HashSet<&'static str>,
    ) -> Vec<String>;
    fn captures_extra(seen: &mut HashSet<&'static str>) -> bool;

    // Provided method
    fn reserved_names(&self, mode: SchemaMode) -> Vec<String> { ... }
}
Expand description

Object shape information used by flattened fields, independent of ownership.

Required Methods§

Source

fn field_names( mode: SchemaMode, seen: &mut HashSet<&'static str>, ) -> Vec<String>

Source

fn captures_extra(seen: &mut HashSet<&'static str>) -> bool

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, S: BuildHasher> ObjectType for HashMap<String, T, S>

Source§

fn field_names(_: SchemaMode, _: &mut HashSet<&'static str>) -> Vec<String>

Source§

fn captures_extra(_: &mut HashSet<&'static str>) -> bool

Source§

fn reserved_names(&self, _: SchemaMode) -> Vec<String>

Source§

impl<T: ObjectType> ObjectType for Box<T>

Source§

fn field_names( mode: SchemaMode, seen: &mut HashSet<&'static str>, ) -> Vec<String>

Source§

fn captures_extra(seen: &mut HashSet<&'static str>) -> bool

Source§

fn reserved_names(&self, mode: SchemaMode) -> Vec<String>

Source§

impl<T: ObjectType> ObjectType for Option<T>

Source§

fn field_names( mode: SchemaMode, seen: &mut HashSet<&'static str>, ) -> Vec<String>

Source§

fn captures_extra(seen: &mut HashSet<&'static str>) -> bool

Source§

fn reserved_names(&self, mode: SchemaMode) -> Vec<String>

Source§

impl<T> ObjectType for BTreeMap<String, T>

Source§

fn field_names(_: SchemaMode, _: &mut HashSet<&'static str>) -> Vec<String>

Source§

fn captures_extra(_: &mut HashSet<&'static str>) -> bool

Source§

fn reserved_names(&self, _: SchemaMode) -> Vec<String>

Implementors§