pub enum MemoryError {
Show 21 variants
Database(Error),
Serialization(Error),
Io(Error),
Config(ConfigError),
MemoryNotFound {
id: String,
},
InvalidVectorDimension {
expected: usize,
actual: usize,
},
InvalidQuery {
message: String,
},
ConnectionFailed {
from: String,
to: String,
reason: String,
},
EvolutionFailed {
message: String,
},
LearningError {
message: String,
},
RetrievalError {
message: String,
},
VectorError {
message: String,
},
GraphError {
message: String,
},
CacheError {
message: String,
},
ConcurrencyError {
message: String,
},
InsufficientResources {
message: String,
},
Timeout {
operation: String,
},
ValidationError {
message: String,
},
PermissionDenied {
message: String,
},
Internal {
message: String,
},
Other(Error),
}Expand description
AI00-Mem库的错误类型
Variants§
Database(Error)
数据库相关错误
Serialization(Error)
序列化/反序列化错误
Io(Error)
IO错误
Config(ConfigError)
配置错误
MemoryNotFound
记忆不存在错误
InvalidVectorDimension
无效的向量维度错误
InvalidQuery
无效的查询参数错误
ConnectionFailed
连接创建失败错误
EvolutionFailed
记忆演化错误
LearningError
学习模块错误
RetrievalError
检索引擎错误
VectorError
向量操作错误
GraphError
图操作错误
CacheError
缓存错误
ConcurrencyError
并发错误
InsufficientResources
资源不足错误
Timeout
超时错误
ValidationError
验证错误
PermissionDenied
权限错误
Internal
内部错误
Other(Error)
其他错误
Implementations§
Source§impl MemoryError
impl MemoryError
Sourcepub fn memory_not_found(id: impl Into<String>) -> Self
pub fn memory_not_found(id: impl Into<String>) -> Self
创建记忆不存在错误
Sourcepub fn invalid_vector_dimension(expected: usize, actual: usize) -> Self
pub fn invalid_vector_dimension(expected: usize, actual: usize) -> Self
创建无效向量维度错误
Sourcepub fn invalid_query(message: impl Into<String>) -> Self
pub fn invalid_query(message: impl Into<String>) -> Self
创建无效查询错误
Sourcepub fn connection_failed(
from: impl Into<String>,
to: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn connection_failed( from: impl Into<String>, to: impl Into<String>, reason: impl Into<String>, ) -> Self
创建连接失败错误
Sourcepub fn evolution_failed(message: impl Into<String>) -> Self
pub fn evolution_failed(message: impl Into<String>) -> Self
创建演化失败错误
Sourcepub fn learning_error(message: impl Into<String>) -> Self
pub fn learning_error(message: impl Into<String>) -> Self
创建学习错误
Sourcepub fn retrieval_error(message: impl Into<String>) -> Self
pub fn retrieval_error(message: impl Into<String>) -> Self
创建检索错误
Sourcepub fn vector_error(message: impl Into<String>) -> Self
pub fn vector_error(message: impl Into<String>) -> Self
创建向量错误
Sourcepub fn graph_error(message: impl Into<String>) -> Self
pub fn graph_error(message: impl Into<String>) -> Self
创建图错误
Sourcepub fn cache_error(message: impl Into<String>) -> Self
pub fn cache_error(message: impl Into<String>) -> Self
创建缓存错误
Sourcepub fn concurrency_error(message: impl Into<String>) -> Self
pub fn concurrency_error(message: impl Into<String>) -> Self
创建并发错误
Sourcepub fn insufficient_resources(message: impl Into<String>) -> Self
pub fn insufficient_resources(message: impl Into<String>) -> Self
创建资源不足错误
Sourcepub fn validation_error(message: impl Into<String>) -> Self
pub fn validation_error(message: impl Into<String>) -> Self
创建验证错误
Sourcepub fn permission_denied(message: impl Into<String>) -> Self
pub fn permission_denied(message: impl Into<String>) -> Self
创建权限错误
Sourcepub fn is_database_error(&self) -> bool
pub fn is_database_error(&self) -> bool
检查是否为数据库错误
Sourcepub fn is_serialization_error(&self) -> bool
pub fn is_serialization_error(&self) -> bool
检查是否为序列化错误
Sourcepub fn is_memory_not_found(&self) -> bool
pub fn is_memory_not_found(&self) -> bool
检查是否为记忆不存在错误
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
检查是否为超时错误
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
获取错误的严重程度
Trait Implementations§
Source§impl Debug for MemoryError
impl Debug for MemoryError
Source§impl Display for MemoryError
impl Display for MemoryError
Source§impl Error for MemoryError
impl Error for MemoryError
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<ConfigError> for MemoryError
impl From<ConfigError> for MemoryError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for MemoryError
impl From<Error> for MemoryError
Source§impl From<Error> for MemoryError
impl From<Error> for MemoryError
Source§impl From<Error> for MemoryError
impl From<Error> for MemoryError
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryError
impl !UnwindSafe for MemoryError
impl Freeze for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnsafeUnpin for MemoryError
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<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> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§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 moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more