Struct security_framework::item::ItemAddOptions
source · pub struct ItemAddOptions {
pub value: ItemAddValue,
pub label: Option<String>,
pub location: Option<Location>,
}
Expand description
Builder-pattern struct for specifying options for add_item
(SecAddItem
wrapper).
When finished populating options, call to_dictionary()
and pass the
resulting CFDictionary to add_item
.
Fields§
§value: ItemAddValue
The value (by ref or data) of the item to add, required.
label: Option<String>
Optional kSecAttrLabel attribute.
location: Option<Location>
Optional keychain location.
Implementations§
source§impl ItemAddOptions
impl ItemAddOptions
sourcepub fn new(value: ItemAddValue) -> Self
pub fn new(value: ItemAddValue) -> Self
Specifies the item to add.
sourcepub fn set_label(&mut self, label: impl Into<String>) -> &mut Self
pub fn set_label(&mut self, label: impl Into<String>) -> &mut Self
Specifies the kSecAttrLabel attribute.
sourcepub fn set_location(&mut self, location: Location) -> &mut Self
pub fn set_location(&mut self, location: Location) -> &mut Self
Specifies which keychain to add the item to.
sourcepub fn to_dictionary(&self) -> CFDictionary
pub fn to_dictionary(&self) -> CFDictionary
Populates a CFDictionary to be passed to
Auto Trait Implementations§
impl RefUnwindSafe for ItemAddOptions
impl !Send for ItemAddOptions
impl !Sync for ItemAddOptions
impl Unpin for ItemAddOptions
impl UnwindSafe for ItemAddOptions
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