Struct diagnostics::DatamodelError
source · pub struct DatamodelError { /* private fields */ }
Implementations§
source§impl DatamodelError
impl DatamodelError
pub fn new_static(message: &'static str, span: Span) -> Self
pub fn new_literal_parser_error( literal_type: &str, raw_value: &str, span: Span ) -> DatamodelError
pub fn new_argument_not_found_error( argument_name: &str, span: Span ) -> DatamodelError
pub fn new_argument_count_mismatch_error( function_name: &str, required_count: usize, given_count: usize, span: Span ) -> DatamodelError
pub fn new_attribute_argument_not_found_error( argument_name: &str, attribute_name: &str, span: Span ) -> DatamodelError
pub fn new_source_argument_not_found_error( argument_name: &str, source_name: &str, span: Span ) -> DatamodelError
pub fn new_generator_argument_not_found_error( argument_name: &str, generator_name: &str, span: Span ) -> DatamodelError
pub fn new_attribute_validation_error( message: &str, attribute_name: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_attribute_error( attribute_name: &str, span: Span ) -> DatamodelError
pub fn new_incompatible_native_type( native_type: &str, field_type: &str, expected_types: &str, span: Span ) -> DatamodelError
pub fn new_invalid_native_type_argument( native_type: &str, got: &str, expected: &str, span: Span ) -> DatamodelError
pub fn new_invalid_prefix_for_native_types( given_prefix: &str, expected_prefix: &str, suggestion: &str, span: Span ) -> DatamodelError
pub fn new_native_types_not_supported( connector_name: String, span: Span ) -> DatamodelError
pub fn new_reserved_scalar_type_error( type_name: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_enum_database_name_error(span: Span) -> DatamodelError
pub fn new_duplicate_model_database_name_error( model_database_name: &str, existing_model_name: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_view_database_name_error( model_database_name: &str, existing_model_name: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_top_error( name: &str, top_type: &str, existing_top_type: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_config_key_error( conf_block_name: &str, key_name: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_argument_error( arg_name: &str, span: Span ) -> DatamodelError
pub fn new_unused_argument_error(span: Span) -> DatamodelError
pub fn new_duplicate_default_argument_error( arg_name: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_enum_value_error( enum_name: &str, value_name: &str, span: Span ) -> DatamodelError
pub fn new_composite_type_duplicate_field_error( type_name: &str, field_name: &str, span: Span ) -> DatamodelError
pub fn new_duplicate_field_error( model_name: &str, field_name: &str, container: &'static str, span: Span ) -> DatamodelError
pub fn new_scalar_list_fields_are_not_supported( container: &str, container_name: &str, field_name: &str, span: Span ) -> DatamodelError
pub fn new_model_validation_error( message: &str, block_type: &'static str, model_name: &str, span: Span ) -> DatamodelError
pub fn new_composite_type_validation_error( message: &str, composite_type_name: &str, span: Span ) -> DatamodelError
pub fn new_enum_validation_error( message: &str, enum_name: &str, span: Span ) -> DatamodelError
pub fn new_composite_type_field_validation_error( message: &str, composite_type_name: &str, field: &str, span: Span ) -> DatamodelError
pub fn new_field_validation_error( message: &str, container_type: &str, container_name: &str, field: &str, span: Span ) -> DatamodelError
pub fn new_source_validation_error( message: &str, source: &str, span: Span ) -> DatamodelError
pub fn new_validation_error(message: &str, span: Span) -> DatamodelError
pub fn new_legacy_parser_error( message: impl Into<Cow<'static, str>>, span: Span ) -> DatamodelError
pub fn new_optional_argument_count_mismatch( native_type: &str, optional_count: usize, given_count: usize, span: Span ) -> DatamodelError
pub fn new_parser_error(expected_str: String, span: Span) -> DatamodelError
pub fn new_functional_evaluation_error( message: impl Into<Cow<'static, str>>, span: Span ) -> DatamodelError
pub fn new_environment_functional_evaluation_error( var_name: String, span: Span ) -> DatamodelError
pub fn new_type_not_found_error(type_name: &str, span: Span) -> DatamodelError
pub fn new_scalar_type_not_found_error( type_name: &str, span: Span ) -> DatamodelError
pub fn new_attribute_not_known_error( attribute_name: &str, span: Span ) -> DatamodelError
pub fn new_property_not_known_error( property_name: &str, span: Span ) -> DatamodelError
pub fn new_argument_not_known_error( property_name: &str, span: Span ) -> DatamodelError
pub fn new_default_unknown_function( function_name: &str, span: Span ) -> DatamodelError
pub fn new_invalid_model_error(msg: &str, span: Span) -> DatamodelError
pub fn new_datasource_provider_not_known_error( provider: &str, span: Span ) -> DatamodelError
pub fn new_shadow_database_is_same_as_main_url_error( source_name: String, span: Span ) -> DatamodelError
pub fn new_preview_feature_not_known_error( preview_feature: &str, expected_preview_features: String, span: Span ) -> DatamodelError
pub fn new_value_parser_error( expected_type: &str, raw: &str, span: Span ) -> DatamodelError
pub fn new_native_type_argument_count_mismatch_error( native_type: &str, required_count: usize, given_count: usize, span: Span ) -> DatamodelError
pub fn new_native_type_name_unknown( connector_name: &str, native_type: &str, span: Span ) -> DatamodelError
pub fn new_native_type_parser_error( native_type: &str, span: Span ) -> DatamodelError
pub fn new_type_mismatch_error( expected_type: &str, received_type: &str, raw: &str, span: Span ) -> DatamodelError
pub fn new_schemas_array_empty_error(span: Span) -> DatamodelError
pub fn new_referential_integrity_and_relation_mode_cooccur_error( span: Span ) -> DatamodelError
pub fn new_config_property_missing_value_error( property_name: &str, config_name: &str, config_kind: &str, span: Span ) -> DatamodelError
pub fn span(&self) -> Span
pub fn message(&self) -> &str
pub fn pretty_print( &self, f: &mut dyn Write, file_name: &str, text: &str ) -> Result<()>
Trait Implementations§
source§impl Clone for DatamodelError
impl Clone for DatamodelError
source§fn clone(&self) -> DatamodelError
fn clone(&self) -> DatamodelError
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 DatamodelError
impl Debug for DatamodelError
source§impl From<DatamodelError> for Diagnostics
impl From<DatamodelError> for Diagnostics
source§fn from(error: DatamodelError) -> Self
fn from(error: DatamodelError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for DatamodelError
impl Send for DatamodelError
impl Sync for DatamodelError
impl Unpin for DatamodelError
impl UnwindSafe for DatamodelError
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