#[repr(C)]pub struct SecKeychainSearch { /* private fields */ }
SecBase
only.Expand description
Contains information about a keychain search.
See also Apple’s documentation
Implementations§
Source§impl SecKeychainSearch
impl SecKeychainSearch
Sourcepub unsafe fn create_from_attributes(
keychain_or_array: Option<&CFType>,
item_class: SecItemClass,
attr_list: *const SecKeychainAttributeList,
search_ref: NonNull<*mut SecKeychainSearch>,
) -> i32
👎Deprecated: SecKeychainSearch is not supportedAvailable on crate features SecKeychainSearch
and SecKeychainItem
only.
pub unsafe fn create_from_attributes( keychain_or_array: Option<&CFType>, item_class: SecItemClass, attr_list: *const SecKeychainAttributeList, search_ref: NonNull<*mut SecKeychainSearch>, ) -> i32
SecKeychainSearch
and SecKeychainItem
only.Creates a search reference matching a list of zero or more specified attributes in the specified keychain.
Parameter keychainOrArray
: An reference to an array of keychains to search, a single keychain or NULL to search the user’s default keychain search list.
Parameter itemClass
: The keychain item class.
Parameter attrList
: A pointer to a list of zero or more keychain attribute records to match. Pass NULL to match any keychain attribute.
Parameter searchRef
: On return, a pointer to the current search reference. You are responsible for calling the CFRelease function to release this reference when finished with it.
Returns: A result code. See “Security Error Codes” (SecBase.h).
This function is deprecated in Mac OS X 10.7 and later; to find keychain items which match specified attributes, please use the SecItemCopyMatching API (see SecItem.h).
Sourcepub unsafe fn copy_next(
self: &SecKeychainSearch,
item_ref: NonNull<*mut SecKeychainItem>,
) -> i32
👎Deprecated: SecKeychainSearch is not supportedAvailable on crate feature SecKeychainSearch
only.
pub unsafe fn copy_next( self: &SecKeychainSearch, item_ref: NonNull<*mut SecKeychainItem>, ) -> i32
SecKeychainSearch
only.Finds the next keychain item matching the given search criteria.
Parameter searchRef
: A reference to the current search criteria. The search reference is created in the SecKeychainSearchCreateFromAttributes function and must be released by calling the CFRelease function when you are done with it.
Parameter itemRef
: On return, a pointer to a keychain item reference of the next matching keychain item, if any.
Returns: A result code. When there are no more items that match the parameters specified to SecPolicySearchCreate, errSecItemNotFound is returned. See “Security Error Codes” (SecBase.h).
This function is deprecated in Mac OS X 10.7 and later; to find keychain items which match specified attributes, please use the SecItemCopyMatching API (see SecItem.h).
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Available on crate feature SecCustomTransform
only.
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
SecCustomTransform
only.Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
Available on crate feature SecCustomTransform
only.
pub fn retain_count(&self) -> usize
SecCustomTransform
only.Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for SecKeychainSearch
impl AsRef<AnyObject> for SecKeychainSearch
Source§impl AsRef<CFType> for SecKeychainSearch
impl AsRef<CFType> for SecKeychainSearch
Source§impl AsRef<SecKeychainSearch> for SecKeychainSearch
impl AsRef<SecKeychainSearch> for SecKeychainSearch
Source§impl Borrow<AnyObject> for SecKeychainSearch
impl Borrow<AnyObject> for SecKeychainSearch
Source§impl Borrow<CFType> for SecKeychainSearch
impl Borrow<CFType> for SecKeychainSearch
Source§impl ConcreteType for SecKeychainSearch
Available on crate feature SecKeychainSearch
only.
impl ConcreteType for SecKeychainSearch
SecKeychainSearch
only.Source§impl Debug for SecKeychainSearch
impl Debug for SecKeychainSearch
Source§impl Deref for SecKeychainSearch
impl Deref for SecKeychainSearch
Source§impl Hash for SecKeychainSearch
impl Hash for SecKeychainSearch
Source§impl Message for SecKeychainSearch
impl Message for SecKeychainSearch
Source§impl PartialEq for SecKeychainSearch
impl PartialEq for SecKeychainSearch
Source§impl RefEncode for SecKeychainSearch
impl RefEncode for SecKeychainSearch
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for SecKeychainSearch
impl Type for SecKeychainSearch
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation
crate. Read more