Struct security_framework::os::macos::import_export::ImportOptions

source ·
pub struct ImportOptions<'a> { /* private fields */ }
Expand description

A builder type to import Security Framework types from serialized formats.

Implementations§

source§

impl<'a> ImportOptions<'a>

source

pub fn new() -> ImportOptions<'a>

Creates a new builder with default options.

source

pub fn filename(&mut self, filename: &str) -> &mut ImportOptions<'a>

Sets the filename from which the imported data came.

The extension of the file will used as a hint for parsing.

source

pub fn passphrase(&mut self, passphrase: &str) -> &mut ImportOptions<'a>

Sets the passphrase to be used to decrypt the imported data.

source

pub fn passphrase_bytes(&mut self, passphrase: &[u8]) -> &mut ImportOptions<'a>

Sets the passphrase to be used to decrypt the imported data.

source

pub fn secure_passphrase( &mut self, secure_passphrase: bool ) -> &mut ImportOptions<'a>

If set, the user will be prompted to imput the passphrase used to decrypt the imported data.

source

pub fn no_access_control( &mut self, no_access_control: bool ) -> &mut ImportOptions<'a>

If set, imported items will have no access controls imposed on them.

source

pub fn alert_title(&mut self, alert_title: &str) -> &mut ImportOptions<'a>

Sets the title of the alert popup used with the secure_passphrase option.

source

pub fn alert_prompt(&mut self, alert_prompt: &str) -> &mut ImportOptions<'a>

Sets the prompt of the alert popup used with the secure_passphrase option.

source

pub fn items(&mut self, items: &'a mut SecItems) -> &mut ImportOptions<'a>

Sets the object into which imported items will be placed.

source

pub fn keychain(&mut self, keychain: &SecKeychain) -> &mut ImportOptions<'a>

Sets the keychain into which items will be imported.

This must be specified to import SecIdentitys.

source

pub fn import(&mut self, data: &[u8]) -> Result<()>

Imports items from serialized data.

Trait Implementations§

source§

impl<'a> Default for ImportOptions<'a>

source§

fn default() -> ImportOptions<'a>

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

Auto Trait Implementations§

§

impl<'a> Freeze for ImportOptions<'a>

§

impl<'a> RefUnwindSafe for ImportOptions<'a>

§

impl<'a> !Send for ImportOptions<'a>

§

impl<'a> !Sync for ImportOptions<'a>

§

impl<'a> Unpin for ImportOptions<'a>

§

impl<'a> !UnwindSafe for ImportOptions<'a>

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>,

§

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>,

§

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.