Skip to main content

ContainerView

Enum ContainerView 

Source
pub enum ContainerView<'graph, 'a> {
    Array(InnerView<'graph, 'a>),
    Map(InnerView<'graph, 'a>),
    Optional(InnerView<'graph, 'a>),
}
Expand description

A graph-aware view of a container type.

Variants§

§

Array(InnerView<'graph, 'a>)

§

Map(InnerView<'graph, 'a>)

§

Optional(InnerView<'graph, 'a>)

Implementations§

Source§

impl<'graph, 'a> ContainerView<'graph, 'a>

Source

pub fn ty(&self) -> TypeView<'graph, 'a>

Returns a type view of this container type.

Trait Implementations§

Source§

impl<'graph, 'a> Debug for ContainerView<'graph, 'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'graph, 'a> Freeze for ContainerView<'graph, 'a>

§

impl<'graph, 'a> !RefUnwindSafe for ContainerView<'graph, 'a>

§

impl<'graph, 'a> Send for ContainerView<'graph, 'a>

§

impl<'graph, 'a> Sync for ContainerView<'graph, 'a>

§

impl<'graph, 'a> Unpin for ContainerView<'graph, 'a>

§

impl<'graph, 'a> UnsafeUnpin for ContainerView<'graph, 'a>

§

impl<'graph, 'a> !UnwindSafe for ContainerView<'graph, 'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'graph, 'a, T> ExtendableView<'graph, 'a> for T
where 'a: 'graph, T: ViewNode<'graph, 'a>,

Source§

fn extensions(&self) -> &ViewExtensions<T>

Returns a reference to this type’s extended data.
Source§

fn extensions_mut(&mut self) -> &mut ViewExtensions<T>

Returns a mutable reference to this type’s extended data.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'graph, 'a, T> View<'graph, 'a> for T
where 'a: 'graph, T: ViewNode<'graph, 'a>,

Source§

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>

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>

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>

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 hashable(&self) -> bool

Returns true if this type can implement Eq and Hash.
Source§

fn defaultable(&self) -> bool

Returns true if this type can implement Default.