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() -> AuthorizationItemSetBuilder
pub fn new() -> AuthorizationItemSetBuilder
Creates a new AuthorizationItemSetStore
, which simplifies creating
owned vectors of AuthorizationItem
s.
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.