pub struct FieldDirective {
pub after: bool,
pub name: CamelCaseString,
pub type: Resolvable<TypeNode>,
pub docs: Docs,
pub default_value: Option<Resolvable<ValueNode>>,
pub default_value_strategy: Option<DefaultValueStrategy>,
}Fields§
§after: bool§name: CamelCaseString§type: Resolvable<TypeNode>§docs: Docs§default_value: Option<Resolvable<ValueNode>>§default_value_strategy: Option<DefaultValueStrategy>Implementations§
Source§impl FieldDirective
impl FieldDirective
pub fn parse(meta: &Meta) -> Result<Self>
Sourcepub fn to_struct_field_type_node(&self) -> CodamaResult<StructFieldTypeNode>
pub fn to_struct_field_type_node(&self) -> CodamaResult<StructFieldTypeNode>
Construct a StructFieldTypeNode from this directive.
Returns an error if any unresolved directives remain.
Trait Implementations§
Source§impl Debug for FieldDirective
impl Debug for FieldDirective
Source§impl From<FieldDirective> for CodamaDirective
impl From<FieldDirective> for CodamaDirective
Source§fn from(value: FieldDirective) -> Self
fn from(value: FieldDirective) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FieldDirective
impl PartialEq for FieldDirective
Source§impl<'a> TryFrom<&'a Attribute<'a>> for &'a FieldDirective
impl<'a> TryFrom<&'a Attribute<'a>> for &'a FieldDirective
Source§impl<'a> TryFrom<&'a CodamaAttribute<'a>> for &'a FieldDirective
impl<'a> TryFrom<&'a CodamaAttribute<'a>> for &'a FieldDirective
Source§type Error = CodamaError
type Error = CodamaError
The type returned in the event of a conversion error.
impl StructuralPartialEq for FieldDirective
Auto Trait Implementations§
impl Freeze for FieldDirective
impl RefUnwindSafe for FieldDirective
impl !Send for FieldDirective
impl !Sync for FieldDirective
impl Unpin for FieldDirective
impl UnsafeUnpin for FieldDirective
impl UnwindSafe for FieldDirective
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