#[non_exhaustive]pub struct Pick {
pub field: String,
pub by: String,
pub domain: Option<String>,
pub ip_in_dns: bool,
}Expand description
One way to name the account: a field of the credential, and what that field is in the directory.
{ "field": "san.upn", "by": "name", "domain": "example.org" }Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.field: StringThe credential’s field, such as san.email or subject.cn.
by: StringWhat the value is in the directory: the Lookup::by it
is answered with, such as email or name.
domain: Option<String>Keep only values ending @<domain> (any case) and take the part before it, as for a
UPN or an email address naming an account of one domain.
ip_in_dns: boolFor san.ip: an IP address written as a DNS name counts as an IP name too. Some
issuers put an address in a dNSName for clients that read no IP SANs. Default
true.
Implementations§
Source§impl Pick
impl Pick
Sourcepub fn new(field: impl Into<String>, by: impl Into<String>) -> Self
pub fn new(field: impl Into<String>, by: impl Into<String>) -> Self
The value of field, looked up by, any domain, IPs in DNS names counted.
Sourcepub fn domain(self, domain: impl Into<String>) -> Self
pub fn domain(self, domain: impl Into<String>) -> Self
This pick keeping only values of domain, without it.
Sourcepub fn ip_in_dns(self, counted: bool) -> Self
pub fn ip_in_dns(self, counted: bool) -> Self
This pick with IP addresses written as DNS names counted (true) or not.
Trait Implementations§
Source§impl Describe for Pick
impl Describe for Pick
impl Eq for Pick
impl Fields for Pick
impl StructuralPartialEq for Pick
Auto Trait Implementations§
impl Freeze for Pick
impl RefUnwindSafe for Pick
impl Send for Pick
impl Sync for Pick
impl Unpin for Pick
impl UnsafeUnpin for Pick
impl UnwindSafe for Pick
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.