pub enum MessageParameter {
DeliveryTimeout {
timeout: u64,
},
AuthorizationToken {
token: AuthorizationToken,
},
Expires {
expires: u64,
},
LargestObject {
location: Location,
},
Forward {
forward: bool,
},
SubscriberPriority {
priority: u8,
},
GroupOrder {
order: GroupOrder,
},
SubscriptionFilter {
filter_type: FilterType,
start_location: Option<Location>,
end_group: Option<u64>,
},
NewGroupRequest {
group: u64,
},
}Variants§
DeliveryTimeout
AuthorizationToken
Fields
§
token: AuthorizationTokenExpires
LargestObject
Forward
SubscriberPriority
GroupOrder
Fields
§
order: GroupOrderSubscriptionFilter
NewGroupRequest
Implementations§
Source§impl MessageParameter
impl MessageParameter
pub fn new_delivery_timeout(timeout: u64) -> Self
pub fn new_expires(expires: u64) -> Self
pub fn new_largest_object(location: Location) -> Self
pub fn new_forward(forward: bool) -> Self
pub fn new_subscriber_priority(priority: u8) -> Self
pub fn new_group_order(order: GroupOrder) -> Self
pub fn new_subscription_filter( filter_type: FilterType, start_location: Option<Location>, end_group: Option<u64>, ) -> Self
pub fn new_group_request(group: u64) -> Self
Sourcepub fn type_value(&self) -> u64
pub fn type_value(&self) -> u64
Returns the raw wire type value for this parameter.
Sourcepub fn is_valid_for(&self, msg_type: ControlMessageType) -> bool
pub fn is_valid_for(&self, msg_type: ControlMessageType) -> bool
Returns true if this parameter is permitted in the given control message type. Per spec: if a known parameter appears in a message where it is not defined, it MUST be ignored by the receiver.
pub fn serialize(&self) -> Result<Bytes, ParseError>
Sourcepub fn deserialize(kvp: &KeyValuePair) -> Result<Self, ParseError>
pub fn deserialize(kvp: &KeyValuePair) -> Result<Self, ParseError>
Deserializes a single MessageParameter from a KeyValuePair. Returns ProtocolViolation for unrecognized parameter types.
Trait Implementations§
Source§impl Clone for MessageParameter
impl Clone for MessageParameter
Source§fn clone(&self) -> MessageParameter
fn clone(&self) -> MessageParameter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageParameter
impl Debug for MessageParameter
Source§impl PartialEq for MessageParameter
impl PartialEq for MessageParameter
Source§fn eq(&self, other: &MessageParameter) -> bool
fn eq(&self, other: &MessageParameter) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MessageParameter
Source§impl TryInto<KeyValuePair> for MessageParameter
impl TryInto<KeyValuePair> for MessageParameter
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl !Freeze for MessageParameter
impl RefUnwindSafe for MessageParameter
impl Send for MessageParameter
impl Sync for MessageParameter
impl Unpin for MessageParameter
impl UnsafeUnpin for MessageParameter
impl UnwindSafe for MessageParameter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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