pub(super) struct SubdiagnosticVariant {
pub(super) kind: SubdiagnosticKind,
pub(super) message: Option<Message>,
}Fields§
§kind: SubdiagnosticKind§message: Option<Message>Implementations§
Source§impl SubdiagnosticVariant
impl SubdiagnosticVariant
Sourcepub(super) fn from_attr(
attr: &Attribute,
fields: &IndexMap<String, (Ident, TokenStream)>,
used_fields: &mut HashSet<Ident>,
) -> Result<Option<SubdiagnosticVariant>, DiagnosticDeriveError>
pub(super) fn from_attr( attr: &Attribute, fields: &IndexMap<String, (Ident, TokenStream)>, used_fields: &mut HashSet<Ident>, ) -> Result<Option<SubdiagnosticVariant>, DiagnosticDeriveError>
Constructs a SubdiagnosticVariant from a field or type attribute such as #[note],
#[error("add parenthesis")] or #[suggestion(code = "...")]. Returns the
SubdiagnosticKind and the diagnostic message, if specified.
Auto Trait Implementations§
impl !Send for SubdiagnosticVariant
impl !Sync for SubdiagnosticVariant
impl Freeze for SubdiagnosticVariant
impl RefUnwindSafe for SubdiagnosticVariant
impl Unpin for SubdiagnosticVariant
impl UnsafeUnpin for SubdiagnosticVariant
impl UnwindSafe for SubdiagnosticVariant
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> 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