pub struct SignalRConnectionInfo {
pub url: String,
pub access_token: String,
}
Expand description
Represents the SignalR connection information input binding.
The following binding attributes are supported:
Name | Description |
---|---|
name | The name of the parameter being bound. |
hub_name | The name of the SignalR hub for which the connection information is generated. |
user_id | The value of the user identifier claim to be set in the access key token (optional). |
connection | The name of the app setting that contains the SignalR Service connection string. Defaults to AzureSignalRConnectionString . |
§Examples
This example implements an HTTP-triggered Azure Function that returns SignalR connection information:
use azure_functions::{
bindings::{HttpRequest, HttpResponse, SignalRConnectionInfo},
func,
};
#[func]
#[binding(name = "_req", auth_level = "anonymous")]
#[binding(
name = "info",
hub_name = "chat",
user_id = "{headers.x-ms-signalr-userid}",
connection = "myconnection"
)]
pub fn negotiate(_req: HttpRequest, info: SignalRConnectionInfo) -> HttpResponse {
info.into()
}
Fields§
§url: String
The endpoint URL for the SignalR service.
access_token: String
The access token for the SignalR service.
Trait Implementations§
Source§impl Clone for SignalRConnectionInfo
impl Clone for SignalRConnectionInfo
Source§fn clone(&self) -> SignalRConnectionInfo
fn clone(&self) -> SignalRConnectionInfo
Returns a copy of the value. Read more
1.0.0 · 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 SignalRConnectionInfo
impl Debug for SignalRConnectionInfo
Source§impl<'de> Deserialize<'de> for SignalRConnectionInfo
impl<'de> Deserialize<'de> for SignalRConnectionInfo
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<'a> Into<Body<'a>> for SignalRConnectionInfo
impl<'a> Into<Body<'a>> for SignalRConnectionInfo
Auto Trait Implementations§
impl Freeze for SignalRConnectionInfo
impl RefUnwindSafe for SignalRConnectionInfo
impl Send for SignalRConnectionInfo
impl Sync for SignalRConnectionInfo
impl Unpin for SignalRConnectionInfo
impl UnwindSafe for SignalRConnectionInfo
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Wrap the input message
T
in a tonic::Request