pub enum EnterResp {
AccountDoesNotExist,
AttributeBanned(Attr),
Banned,
AttributeAlreadyTaken {
attr: Attr,
bans_other_user: bool,
},
NoBannableAttribute,
RetryWithNewIdentifyingAttr,
RetryWithNewAuthToken,
RetryWithNewAddAttr {
index: usize,
},
Entered {
new_account: bool,
auth_token_package: Result<AuthTokenPackage, AuthTokenDeniedReason>,
attr_status: Vec<(Attr, AttrAddStatus)>,
},
}Expand description
Returned by EnterEP.
Variants§
AccountDoesNotExist
Happens only in EnterMode::Login
AttributeBanned(Attr)
This attribute is banned and therefore cannot be used.
Banned
Cannot login, because this account is banned.
AttributeAlreadyTaken
The given identifying attribute (in EnterReq::add_attrs or EnterReq::identifying_attr)
is already tied to another account.
If EnterReq::register_only_with_unique_attrs is set, this variant will also be returned if
a registration is attempted, but one of the supplied attributes already bans another
user.
May occasionally happen under the EnterMode::LoginOrRegister mode if the account
was created by some parallel invocation of EnterEP at about the same time.
Fields
NoBannableAttribute
Cannot register an account with these attributes: no bannable attribute provided.
RetryWithNewIdentifyingAttr
Signature on identifying attribute is invalid or expired; please reobtain the identifying attribute and retry. If this fails even with a fresh attribute something is wrong with the server.
RetryWithNewAuthToken
An authtoken was passed via the Authorization header that is expired or otherwise invalid.
Obtain a new one and retry.
RetryWithNewAddAttr
Signature on EnterReq::add_attrs attribute is invalid or expired; please reobtain the
attribute and retry. If this fails even with a fresh attribute something
is wrong with the server.
Entered
The given identifying attribute (now) grants access to a pubhubs account.
Fields
auth_token_package: Result<AuthTokenPackage, AuthTokenDeniedReason>An access token identifying the user towards pubhubs central.
May not be provided, for example, when the user is banned, or if no bannable attribute is currently associated to the user’s account.
attr_status: Vec<(Attr, AttrAddStatus)>Trait Implementations§
Source§impl<'de> Deserialize<'de> for EnterResp
impl<'de> Deserialize<'de> for EnterResp
Source§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>,
Auto Trait Implementations§
impl Freeze for EnterResp
impl RefUnwindSafe for EnterResp
impl Send for EnterResp
impl Sync for EnterResp
impl Unpin for EnterResp
impl UnsafeUnpin for EnterResp
impl UnwindSafe for EnterResp
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<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>
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