pub struct BanIpWithMetadataParams<'a> {
pub ip_address: &'a str,
pub reason: &'a str,
pub duration: BanDuration,
pub source_fingerprint: Option<&'a str>,
pub ban_source: &'a str,
pub offense_path: Option<&'a str>,
pub user_agent: Option<&'a str>,
pub session_id: Option<&'a str>,
}Fields§
§ip_address: &'a str§reason: &'a str§duration: BanDuration§source_fingerprint: Option<&'a str>§ban_source: &'a str§offense_path: Option<&'a str>§user_agent: Option<&'a str>§session_id: Option<&'a str>Implementations§
Source§impl<'a> BanIpWithMetadataParams<'a>
impl<'a> BanIpWithMetadataParams<'a>
pub const fn new( ip_address: &'a str, reason: &'a str, duration: BanDuration, ban_source: &'a str, ) -> Self
pub const fn with_source_fingerprint(self, fingerprint: &'a str) -> Self
pub const fn with_offense_path(self, path: &'a str) -> Self
pub const fn with_user_agent(self, agent: &'a str) -> Self
pub const fn with_session_id(self, session_id: &'a str) -> Self
Auto Trait Implementations§
impl<'a> Freeze for BanIpWithMetadataParams<'a>
impl<'a> RefUnwindSafe for BanIpWithMetadataParams<'a>
impl<'a> Send for BanIpWithMetadataParams<'a>
impl<'a> Sync for BanIpWithMetadataParams<'a>
impl<'a> Unpin for BanIpWithMetadataParams<'a>
impl<'a> UnsafeUnpin for BanIpWithMetadataParams<'a>
impl<'a> UnwindSafe for BanIpWithMetadataParams<'a>
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> 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