pub fn field_by_name(&self, name: &str) -> Option<&Field<S>> {
        match *self {
            MetaType::Object(ObjectMeta { ref fields, .. })
            | MetaType::Interface(InterfaceMeta { ref fields, .. }) => {
                fields.iter().find(|f| f.name == name)
            }
            _ => None,
        }
    }
/// Access a field's meta data given its name
///
/// Only objects and interfaces have fields. This method always returns `None` for other types.
Access a field's meta data given its name
Only objects and interfaces have fields. This method always returns `None` for other types.
Access a field ' s meta data given its name Only objects and interfaces have fields . This method always returns ` None ` for other types .
pub fn field_by_name(&self, name: &str) -> Option<&Field<S>> {
        match *self {
            MetaType::Object(ObjectMeta { ref fields, .. })
            | MetaType::Interface(InterfaceMeta { ref fields, .. }) => {
                fields.iter().find(|f| f.name == name)
            }
            _ => None,
        }
    }
pub fn field_by_name ( & self , name : & str ) -> Option < & Field < S > > { match * self { MetaType :: Object ( ObjectMeta { ref fields , .. } ) | MetaType :: Interface ( InterfaceMeta { ref fields , .. } ) => { fields . iter ( ) . find ( | f | f . name == name ) } _ => None , } }
Access a field's meta data given its name
Only objects and interfaces have fields.
Access a field ' s meta data given its name Only objects and interfaces have fields .
&self
name
&str
&self
name
&str