pub struct Policy { /* private fields */ }Expand description
Owned SecPolicyRef used to evaluate a certificate chain.
Implementations§
Source§impl Policy
impl Policy
Sourcepub fn basic_x509() -> Result<Self>
pub fn basic_x509() -> Result<Self>
Create Apple’s default X.509 trust policy.
§Errors
Returns an error if Security.framework cannot allocate the policy object.
Sourcepub fn ssl(server: bool, hostname: Option<&str>) -> Result<Self>
pub fn ssl(server: bool, hostname: Option<&str>) -> Result<Self>
Create an SSL policy.
§Errors
Returns an error if the hostname contains NUL bytes or Security.framework cannot allocate the policy object.
Sourcepub const fn as_raw(&self) -> SecPolicyRef
pub const fn as_raw(&self) -> SecPolicyRef
Borrow the raw SecPolicyRef.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl !Send for Policy
impl !Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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