pub struct PackageCapabilities(/* private fields */);
Expand description
Set of bit flags that describes the capabilities of the security package. It is possible to combine them.
§MSDN
Implementations§
Source§impl PackageCapabilities
impl PackageCapabilities
Sourcepub const INTEGRITY: Self
pub const INTEGRITY: Self
The security package supports the make_signature
(TBI) and verify_signature
(TBI) functions.
Sourcepub const PRIVACY: Self
pub const PRIVACY: Self
The security package supports the encrypt_message
and decrypt_message
functions.
Sourcepub const TOKEN_ONLY: Self
pub const TOKEN_ONLY: Self
The package is interested only in the security-token portion of messages, and will ignore any other buffers. This is a performance-related issue.
Sourcepub const DATAGRAM: Self
pub const DATAGRAM: Self
Supports datagram-style authentication. For more information, see SSPI Context Semantics.
Sourcepub const CONNECTION: Self
pub const CONNECTION: Self
Supports connection-oriented style authentication. For more information, see SSPI Context Semantics.
Sourcepub const MULTI_REQUIRED: Self
pub const MULTI_REQUIRED: Self
Multiple legs are required for authentication.
Sourcepub const CLIENT_ONLY: Self
pub const CLIENT_ONLY: Self
Server authentication support is not provided.
Sourcepub const EXTENDED_ERROR: Self
pub const EXTENDED_ERROR: Self
Supports extended error handling. For more information, see Extended Error Information.
Sourcepub const IMPERSONATION: Self
pub const IMPERSONATION: Self
Supports Windows impersonation in server contexts.
Sourcepub const ACCEPT_WIN32_NAME: Self
pub const ACCEPT_WIN32_NAME: Self
Understands Windows principal and target names.
Sourcepub const STREAM: Self
pub const STREAM: Self
Supports stream semantics. For more information, see SSPI Context Semantics.
Sourcepub const NEGOTIABLE: Self
pub const NEGOTIABLE: Self
Can be used by the Microsoft Negotiate security package.
Sourcepub const GSS_COMPATIBLE: Self
pub const GSS_COMPATIBLE: Self
Supports GSS compatibility.
Sourcepub const LOGON: Self
pub const LOGON: Self
Supports LsaLogonUser.
Sourcepub const ASCII_BUFFERS: Self
pub const ASCII_BUFFERS: Self
Token buffers are in ASCII characters format.
Sourcepub const FRAGMENT: Self
pub const FRAGMENT: Self
Supports separating large tokens into smaller buffers so that applications can make repeated calls to
initialize_security_context
and accept_security_context
with the smaller buffers to complete authentication.
Sourcepub const MUTUAL_AUTH: Self
pub const MUTUAL_AUTH: Self
Supports mutual authentication.
Sourcepub const DELEGATION: Self
pub const DELEGATION: Self
Supports delegation.
Sourcepub const READONLY_WITH_CHECKSUM: Self
pub const READONLY_WITH_CHECKSUM: Self
The security package supports using a checksum instead of in-place encryption when calling the encrypt_message
function.
Sourcepub const RESTRICTED_TOKENS: Self
pub const RESTRICTED_TOKENS: Self
Supports callers with restricted tokens.
Sourcepub const NEGO_EXTENDER: Self
pub const NEGO_EXTENDER: Self
The security package extends the Microsoft Negotiate security package. There can be at most one package of this type.
Sourcepub const NEGOTIABLE2: Self
pub const NEGOTIABLE2: Self
This package is negotiated by the package of type NEGO_EXTENDER
.
Sourcepub const APP_CONTAINER_PASSTHROUGH: Self
pub const APP_CONTAINER_PASSTHROUGH: Self
This package receives all calls from app container apps.
Sourcepub const APP_CONTAINER_CHECKS: Self
pub const APP_CONTAINER_CHECKS: Self
This package receives calls from app container apps if one of the following checks succeeds:
- Caller has default credentials capability
- The target is a proxy server
- The caller has supplied credentials
Source§impl PackageCapabilities
impl PackageCapabilities
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> Self
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl PackageCapabilities
impl PackageCapabilities
Sourcepub const fn iter(&self) -> Iter<PackageCapabilities>
pub const fn iter(&self) -> Iter<PackageCapabilities>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<PackageCapabilities>
pub const fn iter_names(&self) -> IterNames<PackageCapabilities>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for PackageCapabilities
impl Binary for PackageCapabilities
Source§impl BitAnd for PackageCapabilities
impl BitAnd for PackageCapabilities
Source§impl BitAndAssign for PackageCapabilities
impl BitAndAssign for PackageCapabilities
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for PackageCapabilities
impl BitOr for PackageCapabilities
Source§fn bitor(self, other: PackageCapabilities) -> Self
fn bitor(self, other: PackageCapabilities) -> Self
The bitwise or (|
) of the bits in two flags values.
Source§type Output = PackageCapabilities
type Output = PackageCapabilities
|
operator.Source§impl BitOrAssign for PackageCapabilities
impl BitOrAssign for PackageCapabilities
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for PackageCapabilities
impl BitXor for PackageCapabilities
Source§impl BitXorAssign for PackageCapabilities
impl BitXorAssign for PackageCapabilities
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for PackageCapabilities
impl Clone for PackageCapabilities
Source§fn clone(&self) -> PackageCapabilities
fn clone(&self) -> PackageCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PackageCapabilities
impl Debug for PackageCapabilities
Source§impl Extend<PackageCapabilities> for PackageCapabilities
impl Extend<PackageCapabilities> for PackageCapabilities
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Flags for PackageCapabilities
impl Flags for PackageCapabilities
Source§const FLAGS: &'static [Flag<PackageCapabilities>]
const FLAGS: &'static [Flag<PackageCapabilities>]
Source§fn from_bits_retain(bits: u32) -> PackageCapabilities
fn from_bits_retain(bits: u32) -> PackageCapabilities
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true
if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<PackageCapabilities> for PackageCapabilities
impl FromIterator<PackageCapabilities> for PackageCapabilities
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
Source§impl Hash for PackageCapabilities
impl Hash for PackageCapabilities
Source§impl IntoIterator for PackageCapabilities
impl IntoIterator for PackageCapabilities
Source§impl LowerHex for PackageCapabilities
impl LowerHex for PackageCapabilities
Source§impl Not for PackageCapabilities
impl Not for PackageCapabilities
Source§impl Octal for PackageCapabilities
impl Octal for PackageCapabilities
Source§impl Ord for PackageCapabilities
impl Ord for PackageCapabilities
Source§fn cmp(&self, other: &PackageCapabilities) -> Ordering
fn cmp(&self, other: &PackageCapabilities) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PackageCapabilities
impl PartialEq for PackageCapabilities
Source§impl PartialOrd for PackageCapabilities
impl PartialOrd for PackageCapabilities
Source§impl PublicFlags for PackageCapabilities
impl PublicFlags for PackageCapabilities
Source§impl Sub for PackageCapabilities
impl Sub for PackageCapabilities
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§type Output = PackageCapabilities
type Output = PackageCapabilities
-
operator.Source§impl SubAssign for PackageCapabilities
impl SubAssign for PackageCapabilities
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.