pub struct UFrameMetadataBuilder { /* private fields */ }Expand description
Builder for native frame metadata.
Obtained from UFrameMetadata::publish, UFrameMetadata::notification,
UFrameMetadata::request, or UFrameMetadata::response. Native
selected-wire code should construct metadata through this builder instead
of going through UMessageBuilder and projecting.
Implementations§
Source§impl UFrameMetadataBuilder
impl UFrameMetadataBuilder
Sourcepub fn with_priority(self, priority: FramePriority) -> Self
pub fn with_priority(self, priority: FramePriority) -> Self
Sets the frame priority.
Sourcepub fn with_comm_status(self, comm_status: UCode) -> Self
pub fn with_comm_status(self, comm_status: UCode) -> Self
Sets the communication status.
Sourcepub fn with_permission_level(self, permission_level: u32) -> Self
pub fn with_permission_level(self, permission_level: u32) -> Self
Sets the permission level.
Sourcepub fn with_token(self, token: impl Into<String>) -> Self
pub fn with_token(self, token: impl Into<String>) -> Self
Sets the access token.
Sourcepub fn with_traceparent(self, traceparent: impl Into<String>) -> Self
pub fn with_traceparent(self, traceparent: impl Into<String>) -> Self
Sets the W3C traceparent.
Sourcepub fn with_payload_encoding(self, payload_encoding: PayloadEncoding) -> Self
pub fn with_payload_encoding(self, payload_encoding: PayloadEncoding) -> Self
Sets the payload encoding of the frame’s payload bytes.
Sourcepub fn build(self) -> Result<UFrameMetadata, UFrameMetadataError>
pub fn build(self) -> Result<UFrameMetadata, UFrameMetadataError>
Builds and validates the frame metadata.
A fresh UUIDv7 frame id is generated unless one was supplied via
Self::with_id.
§Errors
Returns an error if the metadata violates the rules of its frame message kind.
Trait Implementations§
Source§impl Clone for UFrameMetadataBuilder
impl Clone for UFrameMetadataBuilder
Source§fn clone(&self) -> UFrameMetadataBuilder
fn clone(&self) -> UFrameMetadataBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UFrameMetadataBuilder
impl RefUnwindSafe for UFrameMetadataBuilder
impl Send for UFrameMetadataBuilder
impl Sync for UFrameMetadataBuilder
impl Unpin for UFrameMetadataBuilder
impl UnwindSafe for UFrameMetadataBuilder
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<TCore> UWithNativePrefixWire for TCore
impl<TCore> UWithNativePrefixWire for TCore
Source§fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
Wraps this core with an external or custom selected wire using canonical metadata.
Source§fn into_protobuf_transport(
self,
) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
fn into_protobuf_transport( self, ) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
Wraps this core with the Protocol Buffers selected-wire profile.
Source§fn into_stable_container_transport(
self,
) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
Wraps this core with the stable-container selected-wire profile.