pub enum Request {
Subscribe(SubscriptionQuery),
Unsubscribe(SubscriptionQuery),
GetInitialResult(SubscriptionQuery),
FlowControl(SubscriptionQuery),
}
Expand description
The actual request. The Subscription Query is opened using a subscribe
, which opens the flow of updates. Once
successful, the get_initial_result
retrieves the initial result of the subscription. For the server to send
more updates than the initial number of permits, use the flow_control
request to send more permits.
Variants§
Subscribe(SubscriptionQuery)
Start a Subscription Query with the given details.
Unsubscribe(SubscriptionQuery)
Ends a previously started Subscription Query with the given details
GetInitialResult(SubscriptionQuery)
Requests the initial result of a subscription query to be sent. This should always be done after opening the subscription query itself, to remove concurrency conflicts with Update messages.
FlowControl(SubscriptionQuery)
Allows the Server to provide additional Updates to be sent. Only the number_of_permits
field needs to be
set on this message.
Implementations§
source§impl Request
impl Request
sourcepub fn merge<B>(
field: &mut Option<Request>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>(
field: &mut Option<Request>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Request, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Request, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for Request
impl PartialEq for Request
source§impl Serialize for Request
impl Serialize for Request
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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
source§impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
§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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request