pub struct RustField {
pub id: Id,
pub ty: RustType,
pub comments: Vec<String>,
pub has_default: bool,
pub decorators: DecoratorSet,
}Expand description
Rust field definition.
Fields§
§id: IdIdentifier for the field.
ty: RustTypeType of the field.
comments: Vec<String>Comments that were in the original source.
has_default: boolThis will be true if the field has a serde(default) decorator.
Even if the field’s type is not optional, we need to make it optional
for the languages we generate code for.
decorators: DecoratorSetLanguage-specific decorators assigned to a given field. The keys are language names (e.g. SupportedLanguage::TypeScript), the values are field decorators (e.g. readonly)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RustField
impl RefUnwindSafe for RustField
impl Send for RustField
impl Sync for RustField
impl Unpin for RustField
impl UnwindSafe for RustField
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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