pub struct UserIDQueryParams { /* private fields */ }Implementations§
Source§impl UserIDQueryParams
impl UserIDQueryParams
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new UserIDQueryParams.
By default, the query is configured to perform an exact match on the User ID. That is, the pattern must match the start and end of the User ID, and case is considered significant.
Sourcepub fn set_anchor_start(&mut self, anchor_start: bool) -> &mut Self
pub fn set_anchor_start(&mut self, anchor_start: bool) -> &mut Self
Sets whether the pattern must match the start of the User ID or email address.
Sourcepub fn anchor_start(&self) -> bool
pub fn anchor_start(&self) -> bool
Returns whether the pattern must match the start of the User ID or email address.
Sourcepub fn set_anchor_end(&mut self, anchor_end: bool) -> &mut Self
pub fn set_anchor_end(&mut self, anchor_end: bool) -> &mut Self
Sets whether the pattern must match the end of the User ID or email address.
Sourcepub fn anchor_end(&self) -> bool
pub fn anchor_end(&self) -> bool
Returns whether the pattern must match the end of the User ID or email address.
Sourcepub fn set_email(&mut self, email: bool) -> &mut Self
pub fn set_email(&mut self, email: bool) -> &mut Self
Sets whether the pattern must match the User ID or the normalized email address.
The email address to check the pattern against is extracted
from the User ID using UserID::email_normalized.
Note: the pattern is not normalized, even if the anchors are set. If you want to search by email address you need to normalize it your yourself.
Sourcepub fn email(&self) -> bool
pub fn email(&self) -> bool
Returns whether the pattern must match the User ID or the normalized email address.
See UserIDQueryParams::set_email for more details.
Sourcepub fn set_ignore_case(&mut self, ignore_case: bool) -> &mut Self
pub fn set_ignore_case(&mut self, ignore_case: bool) -> &mut Self
Sets whether to ignore the case when matching the User ID or email address.
Uses the empty local.
When matching an email address, the domain is always matched in a case insensitive manner. The localpart, however, is matched in a case sensitive manner by default.
Sourcepub fn ignore_case(&self) -> bool
pub fn ignore_case(&self) -> bool
Returns whether to ignore the case when matching the User ID or email address.
See UserIDQueryParams::set_ignore_case for more details.
Sourcepub fn check(&self, userid: &UserID, pattern: &str) -> bool
pub fn check(&self, userid: &UserID, pattern: &str) -> bool
Checks that the User ID satisfies the constraints.
Sourcepub fn check_lazy_cert(&self, cert: &LazyCert<'_>, pattern: &str) -> bool
pub fn check_lazy_cert(&self, cert: &LazyCert<'_>, pattern: &str) -> bool
Checks that at least one User ID satisfies the constraints.
Sourcepub fn check_cert(&self, cert: &Cert, pattern: &str) -> bool
pub fn check_cert(&self, cert: &Cert, pattern: &str) -> bool
Checks that at least one User ID satisfies the constraints.
Sourcepub fn check_valid_cert(&self, vc: &ValidCert<'_>, pattern: &str) -> bool
pub fn check_valid_cert(&self, vc: &ValidCert<'_>, pattern: &str) -> bool
Checks that at least one User ID satisfies the constraints.
Trait Implementations§
Source§impl Clone for UserIDQueryParams
impl Clone for UserIDQueryParams
Source§fn clone(&self) -> UserIDQueryParams
fn clone(&self) -> UserIDQueryParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more