OCABuilder

Struct OCABuilder 

Source
pub struct OCABuilder {
    pub oca: OCA,
    pub meta_translations: HashMap<Language, OCATranslation>,
    pub form_layout: Option<String>,
    pub default_form_layout: bool,
    pub form_layout_reference: BTreeMap<String, String>,
    pub credential_layout: Option<String>,
    pub default_credential_layout: bool,
    pub credential_layout_reference: BTreeMap<String, String>,
    /* private fields */
}

Fields§

§oca: OCA§meta_translations: HashMap<Language, OCATranslation>§form_layout: Option<String>§default_form_layout: bool§form_layout_reference: BTreeMap<String, String>§credential_layout: Option<String>§default_credential_layout: bool§credential_layout_reference: BTreeMap<String, String>

Implementations§

Source§

impl OCABuilder

Source

pub fn new(default_encoding: Encoding) -> OCABuilder

Source

pub fn add_classification(self, classification: String) -> OCABuilder

Source

pub fn add_form_layout(self, layout: String) -> OCABuilder

Source

pub fn add_default_form_layout(self) -> OCABuilder

Source

pub fn add_credential_layout(self, layout: String) -> OCABuilder

Source

pub fn add_default_credential_layout(self) -> OCABuilder

Source

pub fn add_name(self, names: HashMap<Language, String>) -> OCABuilder

Source

pub fn add_description( self, descriptions: HashMap<Language, String>, ) -> OCABuilder

Source

pub fn add_meta( self, name: String, values: HashMap<Language, String>, ) -> OCABuilder

Source

pub fn add_attribute(self, attr: Attribute) -> OCABuilder

Source

pub fn finalize(self) -> OCA

Source

pub fn build_default_form_layout(&self) -> String

Source

pub fn add_form_layout_reference(&mut self, name: String, layout: String)

Source

pub fn build_default_credential_layout(&self) -> String

Source

pub fn add_credential_layout_reference(&mut self, name: String, layout: String)

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for OCABuilder

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for OCABuilder

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

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

Source§

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

Source§

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,