pub struct TransformError { /* private fields */ }Expand description
A conversion failure with an explicit field/operation context and cause.
Implementations§
Source§impl TransformError
impl TransformError
pub fn new( kind: TransformErrorKind, context: impl Into<String>, detail: impl Into<String>, ) -> Self
pub fn with_source( kind: TransformErrorKind, context: impl Into<String>, detail: impl Into<String>, source: impl Into<Box<dyn Error + Send + Sync + 'static>>, ) -> Self
pub fn shape(context: impl Into<String>, detail: impl Into<String>) -> Self
pub fn unsupported( context: impl Into<String>, detail: impl Into<String>, ) -> Self
pub fn invalid_result( context: impl Into<String>, detail: impl Into<String>, ) -> Self
Sourcepub fn upstream<T>(context: impl Into<String>, payload: T) -> Self
pub fn upstream<T>(context: impl Into<String>, payload: T) -> Self
Retain a declared upstream error for HTTP and streaming renderers.
pub fn missing_metadata(field: impl Into<String>) -> Self
pub fn kind(&self) -> TransformErrorKind
pub fn context(&self) -> &str
pub fn detail(&self) -> &str
Trait Implementations§
Source§impl Debug for TransformError
impl Debug for TransformError
Source§impl Display for TransformError
impl Display for TransformError
Source§impl Error for TransformError
impl Error for TransformError
Source§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()
Source§impl From<CapabilityError> for TransformError
impl From<CapabilityError> for TransformError
Source§fn from(error: CapabilityError) -> Self
fn from(error: CapabilityError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TransformError
impl From<Error> for TransformError
Source§impl From<TransformError> for CompactError
impl From<TransformError> for CompactError
Source§fn from(error: TransformError) -> Self
fn from(error: TransformError) -> Self
Converts to this type from the input type.
Source§impl From<TransformError> for EmbeddingBatchError
impl From<TransformError> for EmbeddingBatchError
Source§fn from(error: TransformError) -> Self
fn from(error: TransformError) -> Self
Converts to this type from the input type.
Source§impl From<TransformError> for UploadError
impl From<TransformError> for UploadError
Source§fn from(error: TransformError) -> Self
fn from(error: TransformError) -> Self
Converts to this type from the input type.
Source§impl From<TransformError> for FileOperationError
impl From<TransformError> for FileOperationError
Source§fn from(value: TransformError) -> Self
fn from(value: TransformError) -> Self
Converts to this type from the input type.
Source§impl From<TransformError> for ImageError
impl From<TransformError> for ImageError
Source§fn from(v: TransformError) -> Self
fn from(v: TransformError) -> Self
Converts to this type from the input type.
Source§impl From<TransformError> for MemoryError
impl From<TransformError> for MemoryError
Source§fn from(e: TransformError) -> Self
fn from(e: TransformError) -> Self
Converts to this type from the input type.
Source§impl From<TransformError> for ModelListError
impl From<TransformError> for ModelListError
Source§fn from(error: TransformError) -> Self
fn from(error: TransformError) -> Self
Converts to this type from the input type.
Source§impl From<TransformError> for ResponsesWsConnectError
impl From<TransformError> for ResponsesWsConnectError
Source§fn from(error: TransformError) -> Self
fn from(error: TransformError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TransformError
impl !UnwindSafe for TransformError
impl Freeze for TransformError
impl Send for TransformError
impl Sync for TransformError
impl Unpin for TransformError
impl UnsafeUnpin for TransformError
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