pub struct MessageBuilder<'a, S: State = Empty> { /* private fields */ }
Expand description
Use builder syntax to set the inputs and finish with build()
.
Implementations§
Source§impl<'a, S: State> MessageBuilder<'a, S>
impl<'a, S: State> MessageBuilder<'a, S>
Sourcepub fn build(self) -> Message<'a>where
S: IsComplete,
pub fn build(self) -> Message<'a>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn content(self, value: Cow<'a, str>) -> MessageBuilder<'a, SetContent<S>>where
S::Content: IsUnset,
pub fn content(self, value: Cow<'a, str>) -> MessageBuilder<'a, SetContent<S>>where
S::Content: IsUnset,
Required.
Sourcepub fn refusal(self, value: &'a str) -> MessageBuilder<'a, SetRefusal<S>>where
S::Refusal: IsUnset,
pub fn refusal(self, value: &'a str) -> MessageBuilder<'a, SetRefusal<S>>where
S::Refusal: IsUnset,
Sourcepub fn maybe_refusal(
self,
value: Option<&'a str>,
) -> MessageBuilder<'a, SetRefusal<S>>where
S::Refusal: IsUnset,
pub fn maybe_refusal(
self,
value: Option<&'a str>,
) -> MessageBuilder<'a, SetRefusal<S>>where
S::Refusal: IsUnset,
Sourcepub fn name(self, value: Cow<'a, str>) -> MessageBuilder<'a, SetName<S>>where
S::Name: IsUnset,
pub fn name(self, value: Cow<'a, str>) -> MessageBuilder<'a, SetName<S>>where
S::Name: IsUnset,
Sourcepub fn maybe_name(
self,
value: Option<Cow<'a, str>>,
) -> MessageBuilder<'a, SetName<S>>where
S::Name: IsUnset,
pub fn maybe_name(
self,
value: Option<Cow<'a, str>>,
) -> MessageBuilder<'a, SetName<S>>where
S::Name: IsUnset,
Auto Trait Implementations§
impl<'a, S> Freeze for MessageBuilder<'a, S>
impl<'a, S> RefUnwindSafe for MessageBuilder<'a, S>
impl<'a, S> Send for MessageBuilder<'a, S>
impl<'a, S> Sync for MessageBuilder<'a, S>
impl<'a, S> Unpin for MessageBuilder<'a, S>
impl<'a, S> UnwindSafe for MessageBuilder<'a, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more