Struct bee_message::prelude::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,
P: RefUnwindSafe,
impl<P> Send for MessageBuilder<P> where
P: Send,
P: Send,
impl<P> Sync for MessageBuilder<P> where
P: Sync,
P: Sync,
impl<P> Unpin for MessageBuilder<P> where
P: Unpin,
P: Unpin,
impl<P> UnwindSafe for MessageBuilder<P> where
P: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,