pub struct Diagnostic {
pub summary: Cow<'static, str>,
pub detail: Cow<'static, str>,
pub attribute: AttributePath,
}Expand description
Diagnostic component
Fields§
§summary: Cow<'static, str>Summary of the diagnostic component
detail: Cow<'static, str>Detail of the diagnostic component
attribute: AttributePathAttribute path for the diagnostic component
Implementations§
Source§impl Diagnostic
Diagnostic
impl Diagnostic
Diagnostic
Sourcepub fn new<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>(
summary: S,
detail: D,
attribute: AttributePath,
) -> Self
pub fn new<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>( summary: S, detail: D, attribute: AttributePath, ) -> Self
Create a diagnostic
§Arguments
summary- Summary of the diagnostic componentdetail- Detail of the diagnostic componentattribute- Attribute path for the diagnostic component
Sourcepub fn function<S: Into<Cow<'static, str>>>(index: i64, message: S) -> Self
pub fn function<S: Into<Cow<'static, str>>>(index: i64, message: S) -> Self
Create a diagnostic for a function argument
§Arguments
index- index of the argument triggering the diagnosticsmessage- Short message of the diagnostics
Sourcepub fn root<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>(
summary: S,
detail: D,
) -> Self
pub fn root<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>( summary: S, detail: D, ) -> Self
Create a diagnostic without AttributePath
§Arguments
summary- Summary of the diagnostic componentdetail- Detail of the diagnostic component
Sourcepub fn short<S: Into<Cow<'static, str>>>(
summary: S,
attribute: AttributePath,
) -> Self
pub fn short<S: Into<Cow<'static, str>>>( summary: S, attribute: AttributePath, ) -> Self
Create a diagnostic without details
§Arguments
summary- Summary of the diagnostic componentattribute- Attribute path for the diagnostic component
Sourcepub fn root_short<S: Into<Cow<'static, str>>>(summary: S) -> Self
pub fn root_short<S: Into<Cow<'static, str>>>(summary: S) -> Self
Create a diagnostic AttributePath nor details
§Arguments
summary- Summary of the diagnostic component
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl Hash for Diagnostic
impl Hash for Diagnostic
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl Eq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request