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