pub struct ObjectMeta<'a, S> { /* private fields */ }
Expand description
Object type metadata
Implementations§
Source§impl<'a, S> ObjectMeta<'a, S>
impl<'a, S> ObjectMeta<'a, S>
Sourcepub fn new(name: Cow<'a, str>, fields: &[Field<'a, S>]) -> Selfwhere
S: Clone,
pub fn new(name: Cow<'a, str>, fields: &[Field<'a, S>]) -> Selfwhere
S: Clone,
Build a new ObjectMeta
type with the specified name
and fields
.
Sourcepub fn description(self, description: &str) -> Self
pub fn description(self, description: &str) -> Self
Sets the description
of this ObjectMeta
type.
Overwrites any previously set description.
Sourcepub fn interfaces(self, interfaces: &[Type<'a>]) -> Self
pub fn interfaces(self, interfaces: &[Type<'a>]) -> Self
Set the interfaces
this ObjectMeta
type implements.
Overwrites any previously set list of interfaces.
Sourcepub fn into_meta(self) -> MetaType<'a, S>
pub fn into_meta(self) -> MetaType<'a, S>
Wraps this ObjectMeta
type into a generic MetaType
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for ObjectMeta<'a, S>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more