pub enum BaseError {
Show 16 variants
Aid(AidError),
Realm(RealmError),
IdentityService {
message: String,
},
SignalingService {
message: String,
},
ControlService {
message: String,
},
TurnService {
message: String,
},
StunService {
message: String,
},
Config(ConfigError),
Network(NetworkError),
Database(DatabaseError),
Storage(StorageError),
Io(Error),
Serialization(SerializationError),
Validation(ValidationError),
General {
message: String,
},
Internal {
message: String,
},
}Expand description
顶层错误枚举,聚合所有子 crate 的错误
Variants§
Aid(AidError)
AId Token 相关错误
Realm(RealmError)
Realm 管理错误
IdentityService
身份服务错误
SignalingService
信令服务错误
ControlService
监管服务错误
TurnService
TURN 服务错误
StunService
STUN 服务错误
Config(ConfigError)
配置错误
Network(NetworkError)
网络错误
Database(DatabaseError)
数据库错误
Storage(StorageError)
存储错误
Io(Error)
IO 错误
Serialization(SerializationError)
序列化错误
Validation(ValidationError)
验证错误
General
通用错误(用于不适合其他类别的错误)
Internal
内部错误(通常表示编程错误)
Implementations§
Source§impl BaseError
impl BaseError
Sourcepub fn identity_service(message: impl Into<String>) -> Self
pub fn identity_service(message: impl Into<String>) -> Self
创建身份服务错误
Sourcepub fn signaling_service(message: impl Into<String>) -> Self
pub fn signaling_service(message: impl Into<String>) -> Self
创建信令服务错误
Sourcepub fn control_service(message: impl Into<String>) -> Self
pub fn control_service(message: impl Into<String>) -> Self
创建监管服务错误
Sourcepub fn turn_service(message: impl Into<String>) -> Self
pub fn turn_service(message: impl Into<String>) -> Self
创建 TURN 服务错误
Sourcepub fn stun_service(message: impl Into<String>) -> Self
pub fn stun_service(message: impl Into<String>) -> Self
创建 STUN 服务错误
Trait Implementations§
Source§impl Error for BaseError
impl Error for BaseError
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 BaseError
impl From<ConfigError> for BaseError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseError> for BaseError
impl From<DatabaseError> for BaseError
Source§fn from(source: DatabaseError) -> Self
fn from(source: DatabaseError) -> Self
Converts to this type from the input type.
Source§impl From<NetworkError> for BaseError
impl From<NetworkError> for BaseError
Source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
Source§impl From<RealmError> for BaseError
impl From<RealmError> for BaseError
Source§fn from(source: RealmError) -> Self
fn from(source: RealmError) -> Self
Converts to this type from the input type.
Source§impl From<SerializationError> for BaseError
impl From<SerializationError> for BaseError
Source§fn from(source: SerializationError) -> Self
fn from(source: SerializationError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for BaseError
impl From<StorageError> for BaseError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for BaseError
impl From<ValidationError> for BaseError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for BaseError
impl !UnwindSafe for BaseError
impl Freeze for BaseError
impl Send for BaseError
impl Sync for BaseError
impl Unpin for BaseError
impl UnsafeUnpin for BaseError
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request