#[non_exhaustive]pub enum ConfigFailure {
Show 15 variants
BadIpSize {
size: i32,
},
BadSecretSize {
size: i32,
},
NonAsciiIp {
byte: u8,
position: usize,
},
UnencodableIp,
BadVersion {
version: i32,
},
BadEnvironment {
code: i32,
},
DcNotFound {
dc_id: i32,
},
NoTcpEndpoint,
BadEndpointIp,
DcIdOutOfRange {
dc_id: i64,
},
PortOutOfRange {
port: i64,
},
NullSessionColumn {
column: &'static str,
},
NoSelfUser,
ConflictingSelfUsers,
BadUserId {
user_id: i64,
},
}Expand description
What an Error::BadConfigData was raised for: the MTP config checks,
and the endpoint, session and self-user checks that report the same
code.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadIpSize
A DC options endpoint declares an IP size outside 1 to 45
(constructFromSerialized).
BadSecretSize
A DC options endpoint declares a secret size outside 0 to 32
(constructFromSerialized).
NonAsciiIp
A serialized DC options IP holds a byte outside ASCII (reported with
the Python UnicodeDecodeError text).
UnencodableIp
An endpoint IP to serialize is not ASCII.
BadVersion
A serialized config has a version other than 1
(MTP.Config.FromSerialized).
BadEnvironment
A serialized config has an environment other than 0 and 1 (reported
with the Python ValueError text).
DcNotFound
A DC id has no endpoints in the config or the built-in table.
NoTcpEndpoint
The main DC has no TCP endpoint (FromTDesktop).
BadEndpointIp
An endpoint IP does not parse as an IPv4 or IPv6 address.
DcIdOutOfRange
A DC id does not fit the session format.
PortOutOfRange
A port does not fit 16 bits.
NullSessionColumn
A column of a Telethon session row is NULL.
NoSelfUser
No cached user of a session is the self user.
ConflictingSelfUsers
Cached users with different ids are the self user.
BadUserId
The self user id is not a tdata user id.
Trait Implementations§
Source§impl Clone for ConfigFailure
impl Clone for ConfigFailure
impl Copy for ConfigFailure
Source§impl Debug for ConfigFailure
impl Debug for ConfigFailure
impl Eq for ConfigFailure
Source§impl Hash for ConfigFailure
impl Hash for ConfigFailure
Source§impl PartialEq for ConfigFailure
impl PartialEq for ConfigFailure
impl StructuralPartialEq for ConfigFailure
Auto Trait Implementations§
impl Freeze for ConfigFailure
impl RefUnwindSafe for ConfigFailure
impl Send for ConfigFailure
impl Sync for ConfigFailure
impl Unpin for ConfigFailure
impl UnsafeUnpin for ConfigFailure
impl UnwindSafe for ConfigFailure
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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 more