Struct bee_message::MessageBuilder[][src]

pub struct MessageBuilder<P: NonceProvider = Miner> { /* fields omitted */ }

A builder to build a Message.

Implementations

impl<P: NonceProvider> MessageBuilder<P>[src]

pub fn new() -> Self[src]

Creates a new MessageBuilder.

pub fn with_network_id(self, network_id: u64) -> Self[src]

Adds a network id to a MessageBuilder.

pub fn with_parents(self, parents: Parents) -> Self[src]

Adds parents to a MessageBuilder.

pub fn with_payload(self, payload: Payload) -> Self[src]

Adds a payload to a MessageBuilder.

pub fn with_nonce_provider(self, nonce_provider: P, target_score: f64) -> Self[src]

Adds a nonce provider to a MessageBuilder.

pub fn finish(self) -> Result<Message, Error>[src]

Finishes the MessageBuilder into a Message.

Trait Implementations

impl<P: NonceProvider> Default for MessageBuilder<P>[src]

Auto Trait Implementations

impl<P> RefUnwindSafe for MessageBuilder<P> where
    P: RefUnwindSafe

impl<P> Send for MessageBuilder<P> where
    P: Send

impl<P> Sync for MessageBuilder<P> where
    P: Sync

impl<P> Unpin for MessageBuilder<P> where
    P: Unpin

impl<P> UnwindSafe for MessageBuilder<P> where
    P: UnwindSafe

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> Same<T> for T

type Output = T

Should always be Self

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.