[][src]Enum tracers_codegen::TracersError

pub enum TracersError {
    InvalidProvider {
        message: String,
        syn_error: Error,
    },
    SynError {
        message: String,
        syn_error: Error,
    },
    DarlingError {
        message: String,
        darling_error: Arc<Mutex<DarlingError>>,
    },
    InvalidCallExpression {
        message: String,
        syn_error: Error,
    },
    OtherError {
        message: String,
        error: Error,
    },
    MissingCallInBuildRs,
    BuildInfoReadError {
        message: String,
        build_info_path: String,
        error: Error,
    },
    BuildInfoWriteError {
        message: String,
        build_info_path: String,
        error: Error,
    },
    ProviderTraitNotProcessedError {
        message: String,
        trait_name: String,
        error: Error,
    },
    CodeGenerationError {
        message: String,
    },
    NativeCodeGenerationError {
        message: String,
        error: Error,
    },
}

Variants

InvalidProvider

Fields of InvalidProvider

message: Stringsyn_error: Error
SynError

Fields of SynError

message: Stringsyn_error: Error
DarlingError

Fields of DarlingError

message: Stringdarling_error: Arc<Mutex<DarlingError>>
InvalidCallExpression

Fields of InvalidCallExpression

message: Stringsyn_error: Error
OtherError

Fields of OtherError

message: Stringerror: Error
MissingCallInBuildRs
BuildInfoReadError

Fields of BuildInfoReadError

message: Stringbuild_info_path: Stringerror: Error
BuildInfoWriteError

Fields of BuildInfoWriteError

message: Stringbuild_info_path: Stringerror: Error
ProviderTraitNotProcessedError

Fields of ProviderTraitNotProcessedError

message: Stringtrait_name: Stringerror: Error
CodeGenerationError

Fields of CodeGenerationError

message: String
NativeCodeGenerationError

Fields of NativeCodeGenerationError

message: Stringerror: Error

Methods

impl TracersError[src]

pub fn invalid_provider<T: ToTokens>(
    message: impl AsRef<str>,
    element: T
) -> TracersError
[src]

pub fn syn_error(message: impl AsRef<str>, e: Error) -> TracersError[src]

pub fn syn_like_error<T: ToTokens, U: Display>(
    message: U,
    tokens: T
) -> TracersError
[src]

When we need to raise an error that is attached to a syn type (meaning the span of the error will correctly be associated with that type), this method is used. There is no actual syn error, we're just reporting a logic error of our own while processing some syn types.

pub fn darling_error(e: DarlingError) -> TracersError[src]

pub fn invalid_call_expression<T: ToTokens>(
    message: impl AsRef<str>,
    element: T
) -> TracersError
[src]

pub fn other_error<D: Display + Send + Sync + 'static>(
    e: Context<D>
) -> TracersError
[src]

pub fn missing_call_in_build_rs() -> TracersError[src]

pub fn build_info_read_error(build_info_path: PathBuf, e: Error) -> TracersError[src]

pub fn build_info_write_error(
    build_info_path: PathBuf,
    e: Error
) -> TracersError
[src]

pub fn provider_trait_not_processed_error<T: AsRef<str>, E: Into<Error> + Display>(
    trait_name: T,
    e: E
) -> TracersError
[src]

pub fn code_generation_error<S: AsRef<str>>(message: S) -> TracersError[src]

pub fn native_code_generation_error<S: AsRef<str>, E: Into<Error> + Display>(
    message: S,
    e: E
) -> TracersError
[src]

pub fn into_syn_error(self) -> Error[src]

Converts this error type into a syn::Error, preserving context from spans and elements if any were given

pub fn into_compiler_error(self) -> TokenStream[src]

Convert this error into a TokenStream such that when the compiler consumes the token stream it will evaluate to a compile error, with the span corresponding to whatever element was used to report the error. For those error types that don't have a corresponding element, the call site of the macro will be used

Trait Implementations

impl Send for TracersError[src]

impl Sync for TracersError[src]

impl<D: Display + Send + Sync + 'static> From<Context<D>> for TracersError[src]

Implement conversion from regular errors into a TracersError, but only if the error has been given a context message using the .context() extension method provided by failure

impl PartialEq<TracersError> for TracersError[src]

impl Display for TracersError[src]

impl Debug for TracersError[src]

impl Fail for TracersError[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsFail for T where
    T: Fail
[src]

impl<E> Fail for E where
    E: 'static + Error + Send + Sync
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,