Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 17 variants WritePhaseContext { phase: WritePhase, source: Box<Error>, }, InvalidCompatibilityLevel { level: u16, }, UnsupportedCompatibilityLevel { version: MssqlVersion, compatibility_level: u16, }, InvalidIdentifier { reason: String, }, Planning { diagnostics: DiagnosticSet, }, ValueConversion { diagnostics: DiagnosticSet, }, DirectEncoding { diagnostics: DiagnosticSet, }, BackendUnavailable { backend: WriteBackend, reason: String, }, InvalidConnectionString, ConnectionTcpConnect { source: Error, }, ConnectionClientSetup { source: Error, }, TableExistsQuery { source: Error, }, TableExistsUnexpectedResult { reason: String, }, TargetRowCountQuery { source: Error, }, TargetRowCountUnexpectedResult { reason: String, }, SqlExecution { source: Error, }, Tiberius { source: Error, },
}
Expand description

Error type for arrow-tiberius operations.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

WritePhaseContext

A write-path operation failed in a known writer phase.

Fields

§phase: WritePhase

Stable writer phase where the failure was observed.

§source: Box<Error>

Original error raised by the failing operation.

§

InvalidCompatibilityLevel

A SQL Server database compatibility level is not supported.

Fields

§level: u16

The unsupported compatibility level value.

§

UnsupportedCompatibilityLevel

A SQL Server database compatibility level is not supported by the selected SQL Server engine version.

Fields

§version: MssqlVersion

SQL Server engine version.

§compatibility_level: u16

Unsupported compatibility level value for the selected version.

§

InvalidIdentifier

A SQL Server identifier is invalid for the selected identifier policy.

Fields

§reason: String

Human-readable reason the identifier is invalid.

§

Planning

Arrow schema planning failed.

Fields

§diagnostics: DiagnosticSet

Structured planning diagnostics.

§

ValueConversion

Runtime value conversion failed.

Fields

§diagnostics: DiagnosticSet

Structured value conversion diagnostics.

§

DirectEncoding

Direct raw TDS encoding failed.

Fields

§diagnostics: DiagnosticSet

Structured direct encoding diagnostics.

§

BackendUnavailable

A requested write backend is not available.

Fields

§backend: WriteBackend

Requested write backend.

§reason: String

Human-readable reason the backend is unavailable.

§

InvalidConnectionString

A SQL Server ADO-style connection string is invalid.

§

ConnectionTcpConnect

Opening the TCP connection to SQL Server failed.

Fields

§source: Error

Source I/O error returned by the TCP transport.

§

ConnectionClientSetup

Tiberius failed while establishing the SQL Server client session.

Fields

§source: Error

Source error returned by Tiberius.

§

TableExistsQuery

SQL Server table-existence metadata query failed.

Fields

§source: Error

Source error returned by Tiberius.

§

TableExistsUnexpectedResult

SQL Server table-existence metadata query returned an unexpected shape.

Fields

§reason: String

Human-readable reason the metadata result could not be interpreted.

§

TargetRowCountQuery

SQL Server target row-count query failed.

Fields

§source: Error

Source error returned by Tiberius.

§

TargetRowCountUnexpectedResult

SQL Server target row-count query returned an unexpected shape.

Fields

§reason: String

Human-readable reason the target row-count result could not be interpreted.

§

SqlExecution

SQL Server lifecycle statement execution failed.

Fields

§source: Error

Source error returned by Tiberius.

§

Tiberius

Tiberius returned an error while executing a SQL Server operation.

Fields

§source: Error

Source error returned by Tiberius.

Implementations§

Source§

impl Error

Source

pub fn with_write_phase(self, phase: WritePhase) -> Self

Attaches stable writer phase context to an error.

Source

pub const fn write_phase(&self) -> Option<WritePhase>

Returns the stable writer phase when the error can be classified.

Source

pub fn without_write_phase(&self) -> &Self

Returns the inner error without writer phase context.

Source

pub fn safe_error_info(&self) -> ErrorInfo<'_>

Returns safe, structured information for user-facing reports.

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error
where Self: Debug + Display,

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for Error

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a Backtrace that may be printed.
Source§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more