Struct juniper::meta::ObjectMeta
source · [−]pub struct ObjectMeta<'a, S> { /* private fields */ }
Expand description
Object type metadata
Implementations
sourceimpl<'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.
Trait Implementations
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for ObjectMeta<'a, S> where
S: RefUnwindSafe,
impl<'a, S> Send for ObjectMeta<'a, S> where
S: Send,
impl<'a, S> Sync for ObjectMeta<'a, S> where
S: Sync,
impl<'a, S> Unpin for ObjectMeta<'a, S> where
S: Unpin,
impl<'a, S> UnwindSafe for ObjectMeta<'a, S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more