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
sourceimpl<'a> ImportOptions<'a>
impl<'a> ImportOptions<'a>
sourcepub fn new() -> ImportOptions<'a>
pub fn new() -> ImportOptions<'a>
Creates a new builder with default options.
sourcepub fn filename(&mut self, filename: &str) -> &mut ImportOptions<'a>
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.
sourcepub fn passphrase(&mut self, passphrase: &str) -> &mut ImportOptions<'a>
pub fn passphrase(&mut self, passphrase: &str) -> &mut ImportOptions<'a>
Sets the passphrase to be used to decrypt the imported data.
sourcepub fn passphrase_bytes(&mut self, passphrase: &[u8]) -> &mut ImportOptions<'a>
pub fn passphrase_bytes(&mut self, passphrase: &[u8]) -> &mut ImportOptions<'a>
Sets the passphrase to be used to decrypt the imported data.
sourcepub fn secure_passphrase(
&mut self,
secure_passphrase: bool
) -> &mut ImportOptions<'a>
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.
sourcepub fn no_access_control(
&mut self,
no_access_control: bool
) -> &mut ImportOptions<'a>
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.
sourcepub fn alert_title(&mut self, alert_title: &str) -> &mut ImportOptions<'a>
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.
sourcepub fn alert_prompt(&mut self, alert_prompt: &str) -> &mut ImportOptions<'a>
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.
sourcepub fn items(&mut self, items: &'a mut SecItems) -> &mut ImportOptions<'a>
pub fn items(&mut self, items: &'a mut SecItems) -> &mut ImportOptions<'a>
Sets the object into which imported items will be placed.
sourcepub fn keychain(&mut self, keychain: &SecKeychain) -> &mut ImportOptions<'a>
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 SecIdentity
s.
Trait Implementations
sourceimpl<'a> Default for ImportOptions<'a>
impl<'a> Default for ImportOptions<'a>
sourcefn default() -> ImportOptions<'a>
fn default() -> ImportOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more