Skip to main content

TransactionBuilder

Struct TransactionBuilder 

Source
pub struct TransactionBuilder<N, K, L, W, WV, A, AV, S: State = Empty>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field, AV: AnnotationValue,
{ /* private fields */ }
Expand description

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

Implementations§

Source§

impl<N, K, L, W, WV, A, AV, S: State> TransactionBuilder<N, K, L, W, WV, A, AV, S>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field, AV: AnnotationValue,

Source

pub fn build(self) -> Transaction<N, K, L, W, WV, A, AV>
where S: IsComplete,

Finish building and return the requested object

Source

pub fn mode( self, value: TransactionMode, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetMode<S>>
where S::Mode: IsUnset,

Optional (Some / Option setters). Default: <TransactionMode as Default>::default().

Transaction mode.

Source

pub fn maybe_mode( self, value: Option<TransactionMode>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetMode<S>>
where S::Mode: IsUnset,

Optional (Some / Option setters). Default: <TransactionMode as Default>::default().

Transaction mode.

Source

pub fn id( self, value: impl Into<Uuid>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetId<S>>
where S::Id: IsUnset,

Optional (Some / Option setters). Instance identifier.

Source

pub fn maybe_id( self, value: Option<impl Into<Uuid>>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetId<S>>
where S::Id: IsUnset,

Optional (Some / Option setters). Instance identifier.

Source

pub fn name( self, value: impl Into<N>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetName<S>>
where S::Name: IsUnset,

Optional (Some / Option setters). Name associated with this instance.

Source

pub fn maybe_name( self, value: Option<impl Into<N>>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetName<S>>
where S::Name: IsUnset,

Optional (Some / Option setters). Name associated with this instance.

Source

pub fn kind( self, value: impl Into<K>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetKind<S>>
where S::Kind: IsUnset,

Optional (Some / Option setters). Kind of object or main category associated with this instance.

Source

pub fn maybe_kind( self, value: Option<impl Into<K>>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetKind<S>>
where S::Kind: IsUnset,

Optional (Some / Option setters). Kind of object or main category associated with this instance.

Source

pub fn labels( self, value: BTreeSet<L>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetLabels<S>>
where S::Labels: IsUnset,

Optional (Some / Option setters). Set of labels associated with this instance.

Source

pub fn maybe_labels( self, value: Option<BTreeSet<L>>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetLabels<S>>
where S::Labels: IsUnset,

Optional (Some / Option setters). Set of labels associated with this instance.

Source

pub fn weights( self, value: BTreeMap<W, WV>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetWeights<S>>
where S::Weights: IsUnset,

Optional (Some / Option setters). Numerical weights associated with this instance.

Source

pub fn maybe_weights( self, value: Option<BTreeMap<W, WV>>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetWeights<S>>
where S::Weights: IsUnset,

Optional (Some / Option setters). Numerical weights associated with this instance.

Source

pub fn annotations( self, value: BTreeMap<A, AV>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetAnnotations<S>>
where S::Annotations: IsUnset,

Optional (Some / Option setters). Free-form annotations associated with this instance.

Source

pub fn maybe_annotations( self, value: Option<BTreeMap<A, AV>>, ) -> TransactionBuilder<N, K, L, W, WV, A, AV, SetAnnotations<S>>
where S::Annotations: IsUnset,

Optional (Some / Option setters). Free-form annotations associated with this instance.

Auto Trait Implementations§

§

impl<N, K, L, W, WV, A, AV, S> Freeze for TransactionBuilder<N, K, L, W, WV, A, AV, S>
where N: Freeze, K: Freeze,

§

impl<N, K, L, W, WV, A, AV, S> RefUnwindSafe for TransactionBuilder<N, K, L, W, WV, A, AV, S>

§

impl<N, K, L, W, WV, A, AV, S> Send for TransactionBuilder<N, K, L, W, WV, A, AV, S>
where N: Send, K: Send, W: Send, WV: Send, A: Send, AV: Send, L: Send,

§

impl<N, K, L, W, WV, A, AV, S> Sync for TransactionBuilder<N, K, L, W, WV, A, AV, S>
where N: Sync, K: Sync, W: Sync, WV: Sync, A: Sync, AV: Sync, L: Sync,

§

impl<N, K, L, W, WV, A, AV, S> Unpin for TransactionBuilder<N, K, L, W, WV, A, AV, S>
where N: Unpin, K: Unpin,

§

impl<N, K, L, W, WV, A, AV, S> UnsafeUnpin for TransactionBuilder<N, K, L, W, WV, A, AV, S>
where N: UnsafeUnpin, K: UnsafeUnpin,

§

impl<N, K, L, W, WV, A, AV, S> UnwindSafe for TransactionBuilder<N, K, L, W, WV, A, AV, S>

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