pub struct Diagnostics {
pub errors: Vec<Diagnostic>,
pub warnings: Vec<Diagnostic>,
}Expand description
List of Errors and Warnings to send back to Terraform
Fields§
§errors: Vec<Diagnostic>List of errors
warnings: Vec<Diagnostic>List of warnings
Implementations§
Source§impl Diagnostics
impl Diagnostics
Sourcepub fn add_error(&mut self, diag: Diagnostic)
pub fn add_error(&mut self, diag: Diagnostic)
Sourcepub fn add_warning(&mut self, diag: Diagnostic)
pub fn add_warning(&mut self, diag: Diagnostic)
Sourcepub fn error<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>(
&mut self,
summary: S,
detail: D,
attribute: AttributePath,
)
pub fn error<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>( &mut self, summary: S, detail: D, attribute: AttributePath, )
Add an error
§Arguments
summary- Summary of the diagnostic componentdetail- Detail of the diagnostic componentattribute- Attribute path for the diagnostic component
Sourcepub fn root_error<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>(
&mut self,
summary: S,
detail: D,
)
pub fn root_error<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>( &mut self, summary: S, detail: D, )
Add an error without AttributePath
§Arguments
summary- Summary of the diagnostic componentdetail- Detail of the diagnostic component
Sourcepub fn error_short<S: Into<Cow<'static, str>>>(
&mut self,
summary: S,
attribute: AttributePath,
)
pub fn error_short<S: Into<Cow<'static, str>>>( &mut self, summary: S, attribute: AttributePath, )
Add an error without details
§Arguments
summary- Summary of the diagnostic componentattribute- Attribute path for the diagnostic component
Sourcepub fn root_error_short<S: Into<Cow<'static, str>>>(&mut self, summary: S)
pub fn root_error_short<S: Into<Cow<'static, str>>>(&mut self, summary: S)
Add an error without AttributePath nor details
§Arguments
summary- Summary of the diagnostic component
Sourcepub fn warning<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>(
&mut self,
summary: S,
detail: D,
attribute: AttributePath,
)
pub fn warning<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>( &mut self, summary: S, detail: D, attribute: AttributePath, )
Add a warning
§Arguments
summary- Summary of the diagnostic componentdetail- Detail of the diagnostic componentattribute- Attribute path for the diagnostic component
Sourcepub fn root_warning<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>(
&mut self,
summary: S,
detail: D,
)
pub fn root_warning<S: Into<Cow<'static, str>>, D: Into<Cow<'static, str>>>( &mut self, summary: S, detail: D, )
Add a warning without AttributePath
§Arguments
summary- Summary of the diagnostic componentdetail- Detail of the diagnostic component
Sourcepub fn warning_short<S: Into<Cow<'static, str>>>(
&mut self,
summary: S,
attribute: AttributePath,
)
pub fn warning_short<S: Into<Cow<'static, str>>>( &mut self, summary: S, attribute: AttributePath, )
Add a warning without details
§Arguments
summary- Summary of the diagnostic componentattribute- Attribute path for the diagnostic component
Sourcepub fn root_warning_short<S: Into<Cow<'static, str>>>(&mut self, summary: S)
pub fn root_warning_short<S: Into<Cow<'static, str>>>(&mut self, summary: S)
Add a warning without AttributePath nor details
§Arguments
summary- Summary of the diagnostic component
Sourcepub fn add_diagnostics(&mut self, diags: Diagnostics)
pub fn add_diagnostics(&mut self, diags: Diagnostics)
Append other diagnostics
Sourcepub fn internal_error(&mut self)
pub fn internal_error(&mut self)
Add an internal error if there is no existing errors
Trait Implementations§
Source§impl Clone for Diagnostics
impl Clone for Diagnostics
Source§fn clone(&self) -> Diagnostics
fn clone(&self) -> Diagnostics
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 Diagnostics
impl Debug for Diagnostics
Source§impl Default for Diagnostics
impl Default for Diagnostics
Source§fn default() -> Diagnostics
fn default() -> Diagnostics
Returns the “default value” for a type. Read more
Source§impl From<Diagnostics> for Vec<Diagnostic>
impl From<Diagnostics> for Vec<Diagnostic>
Source§fn from(value: Diagnostics) -> Self
fn from(value: Diagnostics) -> Self
Converts to this type from the input type.
Source§impl Hash for Diagnostics
impl Hash for Diagnostics
Source§impl PartialEq for Diagnostics
impl PartialEq for Diagnostics
impl Eq for Diagnostics
impl StructuralPartialEq for Diagnostics
Auto Trait Implementations§
impl Freeze for Diagnostics
impl RefUnwindSafe for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnwindSafe for Diagnostics
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