pub struct AuthorizationItemSetBuilder { /* private fields */ }Expand description
A convenience AuthorizationItemSetBuilder builder which enabled you to use
rust types. All names and values passed in will be copied.
Implementations§
Source§impl AuthorizationItemSetBuilder
impl AuthorizationItemSetBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new AuthorizationItemSetStore, which simplifies creating
owned vectors of AuthorizationItems.
Sourcepub fn add_right<N: Into<Vec<u8>>>(self, name: N) -> Result<Self>
pub fn add_right<N: Into<Vec<u8>>>(self, name: N) -> Result<Self>
Adds an AuthorizationItem with the name set to a right and an empty
value.
If name isn’t convertable to a CString it will return
Err(errSecConversionError).
Sourcepub fn add_data<N, V>(self, name: N, value: V) -> Result<Self>
pub fn add_data<N, V>(self, name: N, value: V) -> Result<Self>
Adds an AuthorizationItem with arbitrary data.
If name isn’t convertable to a CString it will return
Err(errSecConversionError).
Sourcepub fn add_string<N, V>(self, name: N, value: V) -> Result<Self>
pub fn add_string<N, V>(self, name: N, value: V) -> Result<Self>
Adds an AuthorizationItem with NULL terminated string data.
If name or value isn’t convertable to a CString it will return
Err(errSecConversionError).
Sourcepub fn build(self) -> AuthorizationItemSetStorage
pub fn build(self) -> AuthorizationItemSetStorage
Creates the sys::AuthorizationItemSet, and gives you ownership of the
data it points to.