Struct diagnostics::DatamodelWarning
source · pub struct DatamodelWarning { /* private fields */ }
Expand description
A non-fatal warning emitted by the schema parser.
For fancy printing, please use the pretty_print_error
function.
Implementations§
source§impl DatamodelWarning
impl DatamodelWarning
sourcepub fn new(message: String, span: Span) -> DatamodelWarning
pub fn new(message: String, span: Span) -> DatamodelWarning
You should avoid using this constructor directly when possible, and define warnings as public methods of this class. The constructor is only left public for supporting connector-specific warnings (which should not live in the core).
pub fn new_feature_deprecated(feature: &str, span: Span) -> DatamodelWarning
pub fn new_referential_integrity_attr_deprecation_warning( span: Span ) -> DatamodelWarning
pub fn new_missing_index_on_emulated_relation(span: Span) -> DatamodelWarning
pub fn new_field_validation( message: &str, model: &str, field: &str, span: Span ) -> DatamodelWarning
pub fn pretty_print( &self, f: &mut dyn Write, file_name: &str, text: &str ) -> Result<()>
Trait Implementations§
source§impl Clone for DatamodelWarning
impl Clone for DatamodelWarning
source§fn clone(&self) -> DatamodelWarning
fn clone(&self) -> DatamodelWarning
Returns a copy 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 DatamodelWarning
impl Debug for DatamodelWarning
source§impl From<DatamodelWarning> for Diagnostics
impl From<DatamodelWarning> for Diagnostics
source§fn from(warning: DatamodelWarning) -> Self
fn from(warning: DatamodelWarning) -> Self
Converts to this type from the input type.
source§impl PartialEq for DatamodelWarning
impl PartialEq for DatamodelWarning
source§fn eq(&self, other: &DatamodelWarning) -> bool
fn eq(&self, other: &DatamodelWarning) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DatamodelWarning
impl StructuralEq for DatamodelWarning
impl StructuralPartialEq for DatamodelWarning
Auto Trait Implementations§
impl RefUnwindSafe for DatamodelWarning
impl Send for DatamodelWarning
impl Sync for DatamodelWarning
impl Unpin for DatamodelWarning
impl UnwindSafe for DatamodelWarning
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