pub fn ensure_not_optional(&self) -> syn::Result<()> {
        let Self {
            label,
            question_mark,
            punct,
            ..
        } = self;
        if question_mark.is_some() {
            let msg = format!(
                "`{}` does not support being used as an optional attribute",
                label
            );
            // include `?=` in the span
            Err(syn::Error::new_spanned(
                quote! { #label#question_mark#punct },
                msg,
            ))
        } else {
            Ok(())
        }
    }
/// Checks if the prop uses the optional attribute syntax.
/// If it does, an error is returned.
Checks if the prop uses the optional attribute syntax.
If it does, an error is returned.
Checks if the prop uses the optional attribute syntax . If it does an error is returned .
pub fn ensure_not_optional(&self) -> syn::Result<()> {
        let Self {
            label,
            question_mark,
            punct,
            ..
        } = self;
        if question_mark.is_some() {
            let msg = format!(
                "`{}` does not support being used as an optional attribute",
                label
            );
            // include `?=` in the span
            Err(syn::Error::new_spanned(
                quote! { #label#question_mark#punct },
                msg,
            ))
        } else {
            Ok(())
        }
    }
pub fn ensure_not_optional ( & self ) -> syn :: Result < ( ) > { let Self { label , question_mark , punct , .. } = self ; if question_mark . is_some ( ) { let msg = format ! ( " " label ) ; // include `?=` in the span Err ( syn :: Error :: new_spanned ( quote ! { label question_mark punct } , msg , ) ) } else { Ok ( ( ) ) } }
Checks if the prop uses the optional attribute syntax.
Checks if the prop uses the optional attribute syntax .
&self
&self