pub enum ConversionError {
UnsupportedStepType {
step_type: String,
type_id: TypeId,
},
ValidationFailed {
step_name: String,
reason: String,
},
YrsTransactionFailed {
operation: String,
reason: String,
},
NodeOperationFailed {
node_id: String,
operation: String,
reason: String,
},
AttributeOperationFailed {
node_id: String,
attr_key: String,
reason: String,
},
MarkOperationFailed {
node_id: String,
mark_type: String,
reason: String,
},
SerializationFailed {
reason: String,
},
PermissionDenied {
user_id: String,
operation: String,
node_id: String,
},
ConcurrencyConflict {
node_id: String,
local_client: String,
remote_client: String,
},
Custom {
message: String,
},
}Expand description
转换错误类型 - 提供详细的错误信息和上下文
Variants§
UnsupportedStepType
ValidationFailed
YrsTransactionFailed
NodeOperationFailed
AttributeOperationFailed
MarkOperationFailed
SerializationFailed
PermissionDenied
ConcurrencyConflict
Custom
Implementations§
Source§impl ConversionError
impl ConversionError
Sourcepub fn unsupported_step<T: 'static>(step_name: &str) -> Self
pub fn unsupported_step<T: 'static>(step_name: &str) -> Self
创建不支持步骤类型错误
Sourcepub fn validation_failed(step_name: &str, reason: &str) -> Self
pub fn validation_failed(step_name: &str, reason: &str) -> Self
创建验证失败错误
Sourcepub fn node_operation_failed(
node_id: &str,
operation: &str,
reason: &str,
) -> Self
pub fn node_operation_failed( node_id: &str, operation: &str, reason: &str, ) -> Self
创建节点操作失败错误
Sourcepub fn permission_denied(user_id: &str, operation: &str, node_id: &str) -> Self
pub fn permission_denied(user_id: &str, operation: &str, node_id: &str) -> Self
创建权限不足错误
Trait Implementations§
Source§impl Clone for ConversionError
impl Clone for ConversionError
Source§fn clone(&self) -> ConversionError
fn clone(&self) -> ConversionError
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 moreSource§impl Debug for ConversionError
impl Debug for ConversionError
Source§impl Display for ConversionError
impl Display for ConversionError
Source§impl Error for ConversionError
impl Error for ConversionError
1.30.0 · 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<RecoverableError> for ConversionError
impl From<RecoverableError> for ConversionError
Source§fn from(err: RecoverableError) -> Self
fn from(err: RecoverableError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConversionError
impl RefUnwindSafe for ConversionError
impl Send for ConversionError
impl Sync for ConversionError
impl Unpin for ConversionError
impl UnsafeUnpin for ConversionError
impl UnwindSafe for ConversionError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.