Enum RetCode
pub enum RetCode {
Show 16 variants
UnknownServerError,
InvalidRequest,
Ok,
MemberNotInVilla,
RoomNotExists,
RoomNotInVilla,
RoleNotExists,
InsufficientPermission,
CannotKickVillaOwner,
CannotKickSelf,
BotNotAdded,
PermissionDenied,
InvalidMemberBotAccessToken,
InvalidBotAuthInfo,
UnsupportedMsgType,
Unknown(i32),
}Expand description
return code of api
Variants§
UnknownServerError
unknown server side error
InvalidRequest
invalid request
Ok
no error
MemberNotInVilla
can’t operate member that not in this villa
RoomNotExists
room not exists
RoomNotInVilla
can’t operate room that not in this villa
RoleNotExists
target role isn’t exists
InsufficientPermission
insufficient permission (for operation that not allow bot to call)
CannotKickVillaOwner
cannot kick villa owner
CannotKickSelf
cannot kick self
BotNotAdded
bot isn’t exists in the target villa
PermissionDenied
api need a permission that the bot doesn’t have
InvalidMemberBotAccessToken
invalid bot access token of a member
InvalidBotAuthInfo
invalid auth info or villa id
UnsupportedMsgType
unsupported message object type
Unknown(i32)
unknown retcode
Trait Implementations§
§impl<'de> Deserialize<'de> for RetCode
impl<'de> Deserialize<'de> for RetCode
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for RetCode
Auto Trait Implementations§
impl Freeze for RetCode
impl RefUnwindSafe for RetCode
impl Send for RetCode
impl Sync for RetCode
impl Unpin for RetCode
impl UnwindSafe for RetCode
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,
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 more