pub struct StructView<'graph, 'a> { /* private fields */ }Expand description
A graph-aware view of a struct type.
Implementations§
Source§impl<'graph, 'a> StructView<'graph, 'a>
impl<'graph, 'a> StructView<'graph, 'a>
Sourcepub fn description(&self) -> Option<&'a str>
pub fn description(&self) -> Option<&'a str>
Returns the description, if present in the schema.
Sourcepub fn fields(&self) -> impl Iterator<Item = StructFieldView<'_, 'graph, 'a>>
pub fn fields(&self) -> impl Iterator<Item = StructFieldView<'_, 'graph, 'a>>
Returns an iterator over all fields, including fields inherited
from allOf schemas. Fields are returned in declaration order:
ancestor fields first, in the order of their parents in allOf;
then this struct’s own fields.
Sourcepub fn own_fields(
&self,
) -> impl Iterator<Item = StructFieldView<'_, 'graph, 'a>>
pub fn own_fields( &self, ) -> impl Iterator<Item = StructFieldView<'_, 'graph, 'a>>
Returns an iterator over fields declared directly on this struct, excluding inherited fields.
Trait Implementations§
Auto Trait Implementations§
impl<'graph, 'a> Freeze for StructView<'graph, 'a>
impl<'graph, 'a> !RefUnwindSafe for StructView<'graph, 'a>
impl<'graph, 'a> Send for StructView<'graph, 'a>
impl<'graph, 'a> Sync for StructView<'graph, 'a>
impl<'graph, 'a> Unpin for StructView<'graph, 'a>
impl<'graph, 'a> UnsafeUnpin for StructView<'graph, 'a>
impl<'graph, 'a> !UnwindSafe for StructView<'graph, 'a>
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<'graph, 'a, T> ExtendableView<'graph, 'a> for Twhere
'a: 'graph,
T: ViewNode<'graph, 'a>,
impl<'graph, 'a, T> ExtendableView<'graph, 'a> for Twhere
'a: 'graph,
T: ViewNode<'graph, 'a>,
Source§fn extensions(&self) -> &ViewExtensions<T>
fn extensions(&self) -> &ViewExtensions<T>
Returns a reference to this type’s extended data.
Source§fn extensions_mut(&mut self) -> &mut ViewExtensions<T>
fn extensions_mut(&mut self) -> &mut ViewExtensions<T>
Returns a mutable reference to this type’s extended data.
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 moreSource§impl<'graph, 'a, T> View<'graph, 'a> for Twhere
'a: 'graph,
T: ViewNode<'graph, 'a>,
impl<'graph, 'a, T> View<'graph, 'a> for Twhere
'a: 'graph,
T: ViewNode<'graph, 'a>,
Source§fn inlines(
&self,
) -> impl Iterator<Item = InlineTypeView<'graph, 'a>> + use<'graph, 'a, T>
fn inlines( &self, ) -> impl Iterator<Item = InlineTypeView<'graph, 'a>> + use<'graph, 'a, T>
Returns an iterator over all the inline types that are
contained within this type.
Source§fn used_by(
&self,
) -> impl Iterator<Item = OperationView<'graph, 'a>> + use<'graph, 'a, T>
fn used_by( &self, ) -> impl Iterator<Item = OperationView<'graph, 'a>> + use<'graph, 'a, T>
Returns an iterator over the operations that use this type. Read more
Source§fn dependencies(
&self,
) -> impl Iterator<Item = TypeView<'graph, 'a>> + use<'graph, 'a, T>
fn dependencies( &self, ) -> impl Iterator<Item = TypeView<'graph, 'a>> + use<'graph, 'a, T>
Returns an iterator over all the types that this type transitively depends on.
This is forward propagation: this type depends on each reachable type. Read more
Source§fn dependents(
&self,
) -> impl Iterator<Item = TypeView<'graph, 'a>> + use<'graph, 'a, T>
fn dependents( &self, ) -> impl Iterator<Item = TypeView<'graph, 'a>> + use<'graph, 'a, T>
Returns an iterator over all the types that transitively depend on this type.
This is backward propagation: each returned type depends on this type. Read more
Source§fn defaultable(&self) -> bool
fn defaultable(&self) -> bool
Returns
true if this type can implement Default.