pub struct OperationId(pub String);Expand description
A caller-generated operation id.
Unique across request, subscribe, and unsubscribe frames for the
lifetime of one connection. The server echoes it on the operation’s
single terminal frame.
The codec rejects an EMPTY operation id in BOTH directions: an empty
string can never be a unique caller-generated id, so it is a
frame-grammar violation rather than a value the protocol has to give
meaning to. Decode rejects it in OperationId’s Deserialize impl;
encode rejects it in crate::codec::encode_frame_with_max, so a
locally constructed frame carrying one can never leave this crate.
In-memory construction (From<String>, From<&str>) remains
unrestricted; only the wire form is validated.
Tuple Fields§
§0: StringTrait Implementations§
Source§impl Clone for OperationId
impl Clone for OperationId
Source§impl Debug for OperationId
impl Debug for OperationId
Source§impl<'de> Deserialize<'de> for OperationId
impl<'de> Deserialize<'de> for OperationId
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OperationId
impl Display for OperationId
impl Eq for OperationId
Source§impl From<&str> for OperationId
impl From<&str> for OperationId
Source§impl From<String> for OperationId
impl From<String> for OperationId
Source§impl Hash for OperationId
impl Hash for OperationId
Source§impl PartialEq for OperationId
impl PartialEq for OperationId
Source§impl Serialize for OperationId
impl Serialize for OperationId
impl StructuralPartialEq for OperationId
Auto Trait Implementations§
impl Freeze for OperationId
impl RefUnwindSafe for OperationId
impl Send for OperationId
impl Sync for OperationId
impl Unpin for OperationId
impl UnsafeUnpin for OperationId
impl UnwindSafe for OperationId
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