pub struct DatamodelError { /* private fields */ }

Implementations§

source§

impl DatamodelError

source

pub fn new_static(message: &'static str, span: Span) -> Self

source

pub fn new_literal_parser_error( literal_type: &str, raw_value: &str, span: Span ) -> DatamodelError

source

pub fn new_argument_not_found_error( argument_name: &str, span: Span ) -> DatamodelError

source

pub fn new_argument_count_mismatch_error( function_name: &str, required_count: usize, given_count: usize, span: Span ) -> DatamodelError

source

pub fn new_attribute_argument_not_found_error( argument_name: &str, attribute_name: &str, span: Span ) -> DatamodelError

source

pub fn new_source_argument_not_found_error( argument_name: &str, source_name: &str, span: Span ) -> DatamodelError

source

pub fn new_generator_argument_not_found_error( argument_name: &str, generator_name: &str, span: Span ) -> DatamodelError

source

pub fn new_attribute_validation_error( message: &str, attribute_name: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_attribute_error( attribute_name: &str, span: Span ) -> DatamodelError

source

pub fn new_incompatible_native_type( native_type: &str, field_type: &str, expected_types: &str, span: Span ) -> DatamodelError

source

pub fn new_invalid_native_type_argument( native_type: &str, got: &str, expected: &str, span: Span ) -> DatamodelError

source

pub fn new_invalid_prefix_for_native_types( given_prefix: &str, expected_prefix: &str, suggestion: &str, span: Span ) -> DatamodelError

source

pub fn new_native_types_not_supported( connector_name: String, span: Span ) -> DatamodelError

source

pub fn new_reserved_scalar_type_error( type_name: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_enum_database_name_error(span: Span) -> DatamodelError

source

pub fn new_duplicate_model_database_name_error( model_database_name: &str, existing_model_name: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_view_database_name_error( model_database_name: &str, existing_model_name: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_top_error( name: &str, top_type: &str, existing_top_type: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_config_key_error( conf_block_name: &str, key_name: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_argument_error( arg_name: &str, span: Span ) -> DatamodelError

source

pub fn new_unused_argument_error(span: Span) -> DatamodelError

source

pub fn new_duplicate_default_argument_error( arg_name: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_enum_value_error( enum_name: &str, value_name: &str, span: Span ) -> DatamodelError

source

pub fn new_composite_type_duplicate_field_error( type_name: &str, field_name: &str, span: Span ) -> DatamodelError

source

pub fn new_duplicate_field_error( model_name: &str, field_name: &str, container: &'static str, span: Span ) -> DatamodelError

source

pub fn new_scalar_list_fields_are_not_supported( container: &str, container_name: &str, field_name: &str, span: Span ) -> DatamodelError

source

pub fn new_model_validation_error( message: &str, block_type: &'static str, model_name: &str, span: Span ) -> DatamodelError

source

pub fn new_composite_type_validation_error( message: &str, composite_type_name: &str, span: Span ) -> DatamodelError

source

pub fn new_enum_validation_error( message: &str, enum_name: &str, span: Span ) -> DatamodelError

source

pub fn new_composite_type_field_validation_error( message: &str, composite_type_name: &str, field: &str, span: Span ) -> DatamodelError

source

pub fn new_field_validation_error( message: &str, container_type: &str, container_name: &str, field: &str, span: Span ) -> DatamodelError

source

pub fn new_source_validation_error( message: &str, source: &str, span: Span ) -> DatamodelError

source

pub fn new_validation_error(message: &str, span: Span) -> DatamodelError

source

pub fn new_legacy_parser_error( message: impl Into<Cow<'static, str>>, span: Span ) -> DatamodelError

source

pub fn new_optional_argument_count_mismatch( native_type: &str, optional_count: usize, given_count: usize, span: Span ) -> DatamodelError

source

pub fn new_parser_error(expected_str: String, span: Span) -> DatamodelError

source

pub fn new_functional_evaluation_error( message: impl Into<Cow<'static, str>>, span: Span ) -> DatamodelError

source

pub fn new_environment_functional_evaluation_error( var_name: String, span: Span ) -> DatamodelError

source

pub fn new_type_not_found_error(type_name: &str, span: Span) -> DatamodelError

source

pub fn new_scalar_type_not_found_error( type_name: &str, span: Span ) -> DatamodelError

source

pub fn new_attribute_not_known_error( attribute_name: &str, span: Span ) -> DatamodelError

source

pub fn new_property_not_known_error( property_name: &str, span: Span ) -> DatamodelError

source

pub fn new_argument_not_known_error( property_name: &str, span: Span ) -> DatamodelError

source

pub fn new_default_unknown_function( function_name: &str, span: Span ) -> DatamodelError

source

pub fn new_invalid_model_error(msg: &str, span: Span) -> DatamodelError

source

pub fn new_datasource_provider_not_known_error( provider: &str, span: Span ) -> DatamodelError

source

pub fn new_shadow_database_is_same_as_main_url_error( source_name: String, span: Span ) -> DatamodelError

source

pub fn new_preview_feature_not_known_error( preview_feature: &str, expected_preview_features: String, span: Span ) -> DatamodelError

source

pub fn new_value_parser_error( expected_type: &str, raw: &str, span: Span ) -> DatamodelError

source

pub fn new_native_type_argument_count_mismatch_error( native_type: &str, required_count: usize, given_count: usize, span: Span ) -> DatamodelError

source

pub fn new_native_type_name_unknown( connector_name: &str, native_type: &str, span: Span ) -> DatamodelError

source

pub fn new_native_type_parser_error( native_type: &str, span: Span ) -> DatamodelError

source

pub fn new_type_mismatch_error( expected_type: &str, received_type: &str, raw: &str, span: Span ) -> DatamodelError

source

pub fn new_schemas_array_empty_error(span: Span) -> DatamodelError

source

pub fn new_referential_integrity_and_relation_mode_cooccur_error( span: Span ) -> DatamodelError

source

pub fn new_config_property_missing_value_error( property_name: &str, config_name: &str, config_kind: &str, span: Span ) -> DatamodelError

source

pub fn span(&self) -> Span

source

pub fn message(&self) -> &str

source

pub fn pretty_print( &self, f: &mut dyn Write, file_name: &str, text: &str ) -> Result<()>

Trait Implementations§

source§

impl Clone for DatamodelError

source§

fn clone(&self) -> DatamodelError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DatamodelError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<DatamodelError> for Diagnostics

source§

fn from(error: DatamodelError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.