pub enum UserInSession {
OnThisConnection,
At(IpAddr),
}Expand description
Indicates that a user is in session for a non-interactive service call.
When a user is in session, YAXI forwards the user’s IP address to their bank. That
address is either this connection’s own source IP (UserInSession::OnThisConnection)
or an IP address the caller provides (UserInSession::At).
Without a user in session, banks limit how many requests a caller may make and
reject excess requests with an Error::AccessExceeded error. A user in session
lifts that limit.
Variants§
OnThisConnection
The user’s IP is this connection’s own source IP.
At(IpAddr)
The user is at the given IP address.
Trait Implementations§
Source§impl Clone for UserInSession
impl Clone for UserInSession
Source§impl Debug for UserInSession
impl Debug for UserInSession
Source§impl<'de> Deserialize<'de> for UserInSession
impl<'de> Deserialize<'de> for UserInSession
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UserInSession
Source§impl PartialEq for UserInSession
impl PartialEq for UserInSession
Source§impl Serialize for UserInSession
impl Serialize for UserInSession
impl StructuralPartialEq for UserInSession
Auto Trait Implementations§
impl Freeze for UserInSession
impl RefUnwindSafe for UserInSession
impl Send for UserInSession
impl Sync for UserInSession
impl Unpin for UserInSession
impl UnsafeUnpin for UserInSession
impl UnwindSafe for UserInSession
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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