Struct bee_message::MessageBuilder[][src]

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

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]

fn default() -> Self[src]

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

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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.