pub struct SubscriptionTarget {
pub op_id: String,
pub input: Value,
pub sse_path: String,
pub sse_query: Option<String>,
pub socket_path: &'static str,
}Expand description
Where a subscription is served. The generated client fills it in; the binding decides which half it reads.
Fields§
§op_id: Stringmodel.<Model>.subscribe or procedure.<name>.
input: ValueThe input a socket’s Request carries: a model feed’s
RpcSubscribeInput, a subscription procedure’s Args.
sse_path: StringThe SSE route: /rpc/subscribe/<op_id> on transport rpc,
/<plural>/$subscribe or /$procs/<name> on REST.
sse_query: Option<String>The input as that route’s query string.
socket_path: &'static strThe socket path: /rpc/ws, or /$ws on REST.
Implementations§
Source§impl SubscriptionTarget
impl SubscriptionTarget
Sourcepub fn procedure_query(args: &Value) -> Option<String>
pub fn procedure_query(args: &Value) -> Option<String>
A subscription procedure’s Args as its SSE query string: each
argument a parameter whose value is that argument’s JSON.
Trait Implementations§
Source§impl Clone for SubscriptionTarget
impl Clone for SubscriptionTarget
Source§fn clone(&self) -> SubscriptionTarget
fn clone(&self) -> SubscriptionTarget
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 moreAuto Trait Implementations§
impl Freeze for SubscriptionTarget
impl RefUnwindSafe for SubscriptionTarget
impl Send for SubscriptionTarget
impl Sync for SubscriptionTarget
impl Unpin for SubscriptionTarget
impl UnsafeUnpin for SubscriptionTarget
impl UnwindSafe for SubscriptionTarget
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more