pub struct ScalarMeta<'a, S> { /* private fields */ }
Expand description
Scalar type metadata
Implementations§
Source§impl<'a, S> ScalarMeta<'a, S>
impl<'a, S> ScalarMeta<'a, S>
Sourcepub fn new<T>(name: Cow<'a, str>) -> Self
pub fn new<T>(name: Cow<'a, str>) -> Self
Builds a new ScalarMeta
type with the specified name
.
Sourcepub fn description(self, description: &str) -> Self
pub fn description(self, description: &str) -> Self
Sets the description
of this ScalarMeta
type.
Overwrites any previously set description.
Sourcepub fn specified_by_url(self, url: impl Into<Cow<'a, str>>) -> Self
pub fn specified_by_url(self, url: impl Into<Cow<'a, str>>) -> Self
Sets the specification URL for this ScalarMeta
type.
Overwrites any previously set specification URL.
Sourcepub fn into_meta(self) -> MetaType<'a, S>
pub fn into_meta(self) -> MetaType<'a, S>
Wraps this ScalarMeta
type into a generic MetaType
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for ScalarMeta<'a, S>
impl<'a, S> RefUnwindSafe for ScalarMeta<'a, S>
impl<'a, S> Send for ScalarMeta<'a, S>
impl<'a, S> Sync for ScalarMeta<'a, S>
impl<'a, S> Unpin for ScalarMeta<'a, S>
impl<'a, S> UnwindSafe for ScalarMeta<'a, S>
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