pub struct TypeSet { /* private fields */ }Expand description
The named types a surface declares, gathered while its fields’ types are worked out: each declared once under one name, however often it is used.
Implementations§
Source§impl TypeSet
impl TypeSet
pub fn new() -> TypeSet
Sourcepub fn named(
&mut self,
identity: &str,
name: &str,
build: impl FnOnce(&mut TypeSet) -> NamedType,
) -> FieldType
pub fn named( &mut self, identity: &str, name: &str, build: impl FnOnce(&mut TypeSet) -> NamedType, ) -> FieldType
The type named name declared for identity (a Rust type’s path),
its body made by build the first time it is asked for. A different
type wanting a name already taken is numbered (Step2).
Sourcepub fn into_types(self) -> Vec<NamedType>
pub fn into_types(self) -> Vec<NamedType>
The declared types, by name.
Trait Implementations§
Auto Trait Implementations§
impl Forget for TypeSet
impl Freeze for TypeSet
impl Move for TypeSet
impl RefUnwindSafe for TypeSet
impl Send for TypeSet
impl Sync for TypeSet
impl Unpin for TypeSet
impl UnsafeUnpin for TypeSet
impl UnwindSafe for TypeSet
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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