pub enum ServerControl {
HelloAck {
protocol_major: ProtocolVersion,
protocol_minor: u32,
capabilities: Vec<CapabilityName>,
sealed: bool,
watermark: Option<Seq>,
},
HelloRefusal {
code: KernelErrorCode,
message: String,
},
Response {
request_id: RequestId,
result: KernelResult,
},
EventBatch {
request_id: RequestId,
events: Vec<EventEnvelope>,
cursor: Seq,
},
StreamClosed {
request_id: RequestId,
code: KernelErrorCode,
last_cursor: Option<Seq>,
},
}Expand description
Everything the kernel may send on kind 0x01.
Variants§
HelloAck
Fields
§
protocol_major: ProtocolVersion§
capabilities: Vec<CapabilityName>The INTERSECTION of what the client asked for and what this kernel offers. A client must not assume anything absent here.
HelloRefusal
Response
EventBatch
One batch on a live subscription. cursor is the last sequence in the
batch — what a reconnect resumes from.
StreamClosed
A subscription ended. last_cursor is what the consumer actually
received, so a slow-consumer disconnect resumes without a gap.
Trait Implementations§
Source§impl Clone for ServerControl
impl Clone for ServerControl
Source§fn clone(&self) -> ServerControl
fn clone(&self) -> ServerControl
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 ServerControl
impl Debug for ServerControl
Source§impl<'de> Deserialize<'de> for ServerControl
impl<'de> Deserialize<'de> for ServerControl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ServerControl
impl PartialEq for ServerControl
Source§impl Serialize for ServerControl
impl Serialize for ServerControl
impl StructuralPartialEq for ServerControl
Auto Trait Implementations§
impl Freeze for ServerControl
impl RefUnwindSafe for ServerControl
impl Send for ServerControl
impl Sync for ServerControl
impl Unpin for ServerControl
impl UnsafeUnpin for ServerControl
impl UnwindSafe for ServerControl
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