Enum PolarsError
pub enum PolarsError {
Show 18 variants
AssertionError(ErrString),
ColumnNotFound(ErrString),
ComputeError(ErrString),
Duplicate(ErrString),
InvalidOperation(ErrString),
IO {
error: Arc<Error>,
msg: Option<ErrString>,
},
NoData(ErrString),
OutOfBounds(ErrString),
SchemaFieldNotFound(ErrString),
SchemaMismatch(ErrString),
ShapeMismatch(ErrString),
SQLInterface(ErrString),
SQLSyntax(ErrString),
StringCacheMismatch(ErrString),
StructFieldNotFound(ErrString),
Context {
error: Box<PolarsError>,
msg: ErrString,
},
ExprContext {
error: Box<PolarsError>,
expr: ErrString,
},
Attached {
error: Box<PolarsError>,
attachment: Box<ErrorAttachment>,
},
}Variants§
AssertionError(ErrString)
ColumnNotFound(ErrString)
ComputeError(ErrString)
Duplicate(ErrString)
InvalidOperation(ErrString)
IO
NoData(ErrString)
OutOfBounds(ErrString)
SchemaFieldNotFound(ErrString)
SchemaMismatch(ErrString)
ShapeMismatch(ErrString)
SQLInterface(ErrString)
SQLSyntax(ErrString)
StringCacheMismatch(ErrString)
StructFieldNotFound(ErrString)
Context
ExprContext
Attached
An error with data attached, such as the plan it happened in.
Implementations§
§impl PolarsError
impl PolarsError
pub fn context_trace(self) -> PolarsError
pub fn wrap_msg<F>(&self, func: F) -> PolarsError
pub fn context(self, msg: ErrString) -> PolarsError
pub fn remove_context(self) -> PolarsError
pub fn remove_context(self) -> PolarsError
Removes the outer Context frames; attachments are kept.
pub fn with_expr_context(self, expr: ErrString) -> PolarsError
pub fn with_attachment(self, attachment: ErrorAttachment) -> PolarsError
pub fn with_hint(self, hint: impl Into<Cow<'static, str>>) -> PolarsError
pub fn sql_location(&self) -> Option<&SqlLocation>
pub fn sql_location(&self) -> Option<&SqlLocation>
The innermost SQL location.
pub fn attachments(&self) -> Vec<&ErrorAttachment>
pub fn attachments(&self) -> Vec<&ErrorAttachment>
The attachments, outermost first.
pub fn retain_attachments<F>(self, keep: F) -> PolarsError
pub fn retain_attachments<F>(self, keep: F) -> PolarsError
Keeps the attachments for which keep returns true.
pub fn inline_attachments(self) -> PolarsError
pub fn inline_attachments(self) -> PolarsError
Writes the attachments into the innermost message.
Trait Implementations§
§impl Clone for PolarsError
impl Clone for PolarsError
§fn clone(&self) -> PolarsError
fn clone(&self) -> PolarsError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PolarsError
impl Debug for PolarsError
§impl Display for PolarsError
impl Display for PolarsError
§impl Error for PolarsError
impl Error for PolarsError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl From<!> for PolarsError
impl From<!> for PolarsError
§fn from(_: !) -> PolarsError
fn from(_: !) -> PolarsError
Converts to this type from the input type.
§impl From<Error> for PolarsError
impl From<Error> for PolarsError
§fn from(value: Error) -> PolarsError
fn from(value: Error) -> PolarsError
Converts to this type from the input type.
§impl From<Error> for PolarsError
Available on crate feature regex only.
impl From<Error> for PolarsError
Available on crate feature
regex only.§fn from(err: Error) -> PolarsError
fn from(err: Error) -> PolarsError
Converts to this type from the input type.
§impl From<Error> for PolarsError
Available on crate feature polars-arrow-format only.
impl From<Error> for PolarsError
Available on crate feature
polars-arrow-format only.§fn from(err: Error) -> PolarsError
fn from(err: Error) -> PolarsError
Converts to this type from the input type.
§impl From<TryReserveError> for PolarsError
impl From<TryReserveError> for PolarsError
§fn from(value: TryReserveError) -> PolarsError
fn from(value: TryReserveError) -> PolarsError
Converts to this type from the input type.
§impl From<Utf8Error> for PolarsError
impl From<Utf8Error> for PolarsError
§fn from(value: Utf8Error) -> PolarsError
fn from(value: Utf8Error) -> PolarsError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PolarsError
impl !UnwindSafe for PolarsError
impl Freeze for PolarsError
impl Send for PolarsError
impl Sync for PolarsError
impl Unpin for PolarsError
impl UnsafeUnpin for PolarsError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more