Struct juniper::meta::ObjectMeta
source · pub struct ObjectMeta<'a, S> { /* private fields */ }
Expand description
Object type metadata
Implementations§
source§impl<'a, S> ObjectMeta<'a, S>where
S: ScalarValue,
impl<'a, S> ObjectMeta<'a, S>where
S: ScalarValue,
sourcepub fn new(name: Cow<'a, str>, fields: &[Field<'a, S>]) -> Self
pub fn new(name: Cow<'a, str>, fields: &[Field<'a, S>]) -> Self
Build a new object type with the specified name and fields
sourcepub fn description(self, description: &str) -> ObjectMeta<'a, S>
pub fn description(self, description: &str) -> ObjectMeta<'a, S>
Set the description for the object
If a description was provided prior to calling this method, it will be overwritten.
sourcepub fn interfaces(self, interfaces: &[Type<'a>]) -> ObjectMeta<'a, S>
pub fn interfaces(self, interfaces: &[Type<'a>]) -> ObjectMeta<'a, S>
Set the interfaces this type implements
If a list of interfaces already was provided prior to calling this method, they will be overwritten.