Skip to main content

IntentDescriptorBuilder

Struct IntentDescriptorBuilder 

Source
pub struct IntentDescriptorBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> IntentDescriptorBuilder<S>

Source

pub fn build(self) -> IntentDescriptor
where S: IsComplete,

Finish building and return the requested object

Source

pub fn description( self, value: String, ) -> IntentDescriptorBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters). Human-readable description of the intent, if provided.

Source

pub fn maybe_description( self, value: Option<String>, ) -> IntentDescriptorBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters). Human-readable description of the intent, if provided.

Source

pub fn intent(self, value: String) -> IntentDescriptorBuilder<SetIntent<S>>
where S::Intent: IsUnset,

Required.

Name of the intent: an arbitrary identifier chosen by the consumer (e.g. verify); any name may be advertised.

Source

pub fn params(self, value: BTreeMap) -> IntentDescriptorBuilder<SetParams<S>>
where S::Params: IsUnset,

Optional (Some / Option setters). Configurable parameters this intent accepts per replica, keyed by parameter name.

Source

pub fn maybe_params( self, value: Option<BTreeMap>, ) -> IntentDescriptorBuilder<SetParams<S>>
where S::Params: IsUnset,

Optional (Some / Option setters). Configurable parameters this intent accepts per replica, keyed by parameter name.

Source

pub fn semantics( self, value: Vec<String>, ) -> IntentDescriptorBuilder<SetSemantics<S>>
where S::Semantics: IsUnset,

Required.

Behaviours this intent opts into. Recognised values are check (a health report is expected for each replica), once (a given snapshot is only ever dispatched to a replica once, rather than repeatedly until overdue), and url (a replica’s health report includes a link to it). Unrecognised values are stored but have no effect.

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.