pub struct FieldView<'view, 'a, P> { /* private fields */ }Expand description
A graph-aware view of a struct or union field.
Implementations§
Source§impl<'view, 'graph, 'a: 'graph, P: ViewNode<'graph, 'a>> FieldView<'view, 'a, P>
impl<'view, 'graph, 'a: 'graph, P: ViewNode<'graph, 'a>> FieldView<'view, 'a, P>
Sourcepub fn name(&self) -> StructFieldName<'a>
pub fn name(&self) -> StructFieldName<'a>
Returns the field name.
Sourcepub fn ty(&self) -> TypeView<'graph, 'a>
pub fn ty(&self) -> TypeView<'graph, 'a>
Returns a view of the inner type that this type wraps.
Sourcepub fn description(&self) -> Option<&'a str>
pub fn description(&self) -> Option<&'a str>
Returns the description, if present in the schema.
Source§impl<'view, 'graph, 'a> FieldView<'view, 'a, StructView<'graph, 'a>>
impl<'view, 'graph, 'a> FieldView<'view, 'a, StructView<'graph, 'a>>
Sourcepub fn inherited(&self) -> bool
pub fn inherited(&self) -> bool
Returns true if this field was inherited from a parent via allOf.
Trait Implementations§
Auto Trait Implementations§
impl<'view, 'a, P> Freeze for FieldView<'view, 'a, P>
impl<'view, 'a, P> RefUnwindSafe for FieldView<'view, 'a, P>where
P: RefUnwindSafe,
impl<'view, 'a, P> Send for FieldView<'view, 'a, P>where
P: Sync,
impl<'view, 'a, P> Sync for FieldView<'view, 'a, P>where
P: Sync,
impl<'view, 'a, P> Unpin for FieldView<'view, 'a, P>
impl<'view, 'a, P> UnsafeUnpin for FieldView<'view, 'a, P>
impl<'view, 'a, P> UnwindSafe for FieldView<'view, 'a, P>where
P: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more