pub struct MessageFrameBuilder { /* private fields */ }Expand description
This frame has required headers message_id,destination,subscription and optional headers content_type,content_length.
Implementations§
Source§impl MessageFrameBuilder
impl MessageFrameBuilder
Sourcepub fn content_type(
self,
new_val: <ContentTypeValue<'_> as HeaderValue>::OwnedValue,
) -> MessageFrameBuilder
pub fn content_type( self, new_val: <ContentTypeValue<'_> as HeaderValue>::OwnedValue, ) -> MessageFrameBuilder
The value of the content_type header.
Sourcepub fn content_length(
self,
new_val: <ContentLengthValue<'_> as HeaderValue>::OwnedValue,
) -> MessageFrameBuilder
pub fn content_length( self, new_val: <ContentLengthValue<'_> as HeaderValue>::OwnedValue, ) -> MessageFrameBuilder
The value of the content_length header.
Sourcepub fn add_custom_header(
self,
name: String,
value: String,
) -> MessageFrameBuilder
pub fn add_custom_header( self, name: String, value: String, ) -> MessageFrameBuilder
Useless doc: cus.
Sourcepub fn body(self, new_value: Vec<u8>) -> MessageFrameBuilder
pub fn body(self, new_value: Vec<u8>) -> MessageFrameBuilder
Useless doc: body.
pub fn new( message_id: <MessageIdValue<'static> as HeaderValue>::OwnedValue, destination: <DestinationValue<'static> as HeaderValue>::OwnedValue, subscription: <SubscriptionValue<'static> as HeaderValue>::OwnedValue, ) -> MessageFrameBuilder
pub fn build(self) -> MessageFrame<'static>
Auto Trait Implementations§
impl Freeze for MessageFrameBuilder
impl RefUnwindSafe for MessageFrameBuilder
impl Send for MessageFrameBuilder
impl Sync for MessageFrameBuilder
impl Unpin for MessageFrameBuilder
impl UnsafeUnpin for MessageFrameBuilder
impl UnwindSafe for MessageFrameBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more