security_framework::item

Struct ItemUpdateOptions

Source
pub struct ItemUpdateOptions {
    pub value: Option<ItemUpdateValue>,
    pub account_name: Option<CFString>,
    pub access_group: Option<CFString>,
    pub comment: Option<CFString>,
    pub description: Option<CFString>,
    pub label: Option<CFString>,
    pub service: Option<CFString>,
    pub location: Option<Location>,
    pub class: Option<ItemClass>,
}
Expand description

Builder-pattern struct for specifying options for update_item (SecUpdateItem wrapper).

When finished populating options call update_item.

Fields§

§value: Option<ItemUpdateValue>

Optional value (by ref or data) of the item to update.

§account_name: Option<CFString>

Optional kSecAttrAccount attribute.

§access_group: Option<CFString>

Optional kSecAttrAccessGroup attribute.

§comment: Option<CFString>

Optional kSecAttrComment attribute.

§description: Option<CFString>

Optional kSecAttrDescription attribute.

§label: Option<CFString>

Optional kSecAttrLabel attribute.

§service: Option<CFString>

Optional kSecAttrService attribute.

§location: Option<Location>

Optional keychain location.

§class: Option<ItemClass>

Optional kSecClass.

Overwrites value’s class if set.

Implementations§

Source§

impl ItemUpdateOptions

Source

pub fn new() -> Self

Specifies the item to add.

Source

pub fn set_value(&mut self, value: ItemUpdateValue) -> &mut Self

Specifies the value of the item.

Source

pub fn set_class(&mut self, class: ItemClass) -> &mut Self

Specifies the kSecClass attribute.

Source

pub fn set_account_name(&mut self, account_name: impl AsRef<str>) -> &mut Self

Specifies the kSecAttrAccount attribute.

Source

pub fn set_access_group(&mut self, access_group: impl AsRef<str>) -> &mut Self

Specifies the kSecAttrAccessGroup attribute.

Source

pub fn set_comment(&mut self, comment: impl AsRef<str>) -> &mut Self

Specifies the kSecAttrComment attribute.

Source

pub fn set_description(&mut self, description: impl AsRef<str>) -> &mut Self

Specifies the kSecAttrDescription attribute.

Source

pub fn set_label(&mut self, label: impl AsRef<str>) -> &mut Self

Specifies the kSecAttrLabel attribute.

Source

pub fn set_location(&mut self, location: Location) -> &mut Self

Specifies which keychain to add the item to.

Source

pub fn set_service(&mut self, service: impl AsRef<str>) -> &mut Self

Specifies the kSecAttrService attribute.

Trait Implementations§

Source§

impl Default for ItemUpdateOptions

Source§

fn default() -> ItemUpdateOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.