[][src]Struct security_framework::authorization::AuthorizationItemSetBuilder

pub struct AuthorizationItemSetBuilder { /* fields omitted */ }

A convenience AuthorizationItemSetBuilder builder which enabled you to use rust types. All names and values passed in will be copied.

Implementations

impl AuthorizationItemSetBuilder[src]

pub fn new() -> AuthorizationItemSetBuilder[src]

Creates a new AuthorizationItemSetStore, which simplifies creating owned vectors of AuthorizationItems.

pub fn add_right<N: Into<Vec<u8>>>(self, name: N) -> Result<Self>[src]

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

pub fn add_data<N, V>(self, name: N, value: V) -> Result<Self> where
    N: Into<Vec<u8>>,
    V: Into<Vec<u8>>, 
[src]

Adds an AuthorizationItem with arbitrary data.

If name isn't convertable to a CString it will return Err(errSecConversionError).

pub fn add_string<N, V>(self, name: N, value: V) -> Result<Self> where
    N: Into<Vec<u8>>,
    V: Into<Vec<u8>>, 
[src]

Adds an AuthorizationItem with NULL terminated string data.

If name or value isn't convertable to a CString it will return Err(errSecConversionError).

pub fn build(self) -> AuthorizationItemSetStorage[src]

Creates the sys::AuthorizationItemSet, and gives you ownership of the data it points to.

Trait Implementations

impl Debug for AuthorizationItemSetBuilder[src]

impl Default for AuthorizationItemSetBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.