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

source

pub fn new() -> AuthorizationItemSetBuilder

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

source

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

source

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

Adds an AuthorizationItem with arbitrary data.

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

source

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

Adds an AuthorizationItem with NULL terminated string data.

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

source

pub fn build(self) -> AuthorizationItemSetStorage

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

Trait Implementations§

source§

impl Debug for AuthorizationItemSetBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AuthorizationItemSetBuilder

source§

fn default() -> AuthorizationItemSetBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.