@@ -13,9 +13,10 @@ pub trait HttpHeaderAdder {
13
13
fn add_headers ( & self , builder : :: http:: request:: Builder ) -> :: http:: request:: Builder ;
14
14
}
15
15
16
- pub trait Client : Send + Sync {
16
+ pub trait Client : std :: fmt :: Debug + Send + Sync {
17
17
fn blob_uri ( & self ) -> & str ;
18
18
fn table_uri ( & self ) -> & str ;
19
+ fn queue_uri ( & self ) -> & str ;
19
20
20
21
/// Uri scheme + authority e.g. http://myaccount.table.core.windows.net/
21
22
#[ inline]
53
54
fn table_uri ( & self ) -> & str {
54
55
self . as_ref ( ) . table_uri ( )
55
56
}
57
+ fn queue_uri ( & self ) -> & str {
58
+ self . as_ref ( ) . queue_uri ( )
59
+ }
56
60
57
61
fn perform_request (
58
62
& self ,
87
91
fn table_uri ( & self ) -> & str {
88
92
self . as_ref ( ) . table_uri ( )
89
93
}
94
+ fn queue_uri ( & self ) -> & str {
95
+ self . as_ref ( ) . queue_uri ( )
96
+ }
90
97
91
98
fn perform_request (
92
99
& self ,
@@ -133,6 +140,7 @@ pub fn with_azure_sas(account: &str, sas_token: &str) -> KeyClient {
133
140
client,
134
141
format ! ( "https://{}.blob.core.windows.net" , account) ,
135
142
format ! ( "https://{}.table.core.windows.net" , account) ,
143
+ format ! ( "https://{}.queue.core.windows.net" , account) ,
136
144
)
137
145
}
138
146
@@ -146,6 +154,7 @@ pub fn with_access_key(account: &str, key: &str) -> KeyClient {
146
154
client,
147
155
format ! ( "https://{}.blob.core.windows.net" , account) ,
148
156
format ! ( "https://{}.table.core.windows.net" , account) ,
157
+ format ! ( "https://{}.queue.core.windows.net" , account) ,
149
158
)
150
159
}
151
160
@@ -167,6 +176,7 @@ pub fn from_connection_string(connection_string: &str) -> Result<KeyClient, Azur
167
176
client,
168
177
format ! ( "https://{}.blob.core.windows.net" , account) ,
169
178
format ! ( "https://{}.table.core.windows.net" , account) ,
179
+ format ! ( "https://{}.queue.core.windows.net" , account) ,
170
180
) )
171
181
}
172
182
ConnectionString {
@@ -180,6 +190,7 @@ pub fn from_connection_string(connection_string: &str) -> Result<KeyClient, Azur
180
190
client,
181
191
format ! ( "https://{}.blob.core.windows.net" , account) ,
182
192
format ! ( "https://{}.table.core.windows.net" , account) ,
193
+ format ! ( "https://{}.queue.core.windows.net" , account) ,
183
194
) ) ,
184
195
ConnectionString {
185
196
account_name : Some ( account) ,
@@ -192,6 +203,7 @@ pub fn from_connection_string(connection_string: &str) -> Result<KeyClient, Azur
192
203
client,
193
204
format ! ( "https://{}.blob.core.windows.net" , account) ,
194
205
format ! ( "https://{}.table.core.windows.net" , account) ,
206
+ format ! ( "https://{}.queue.core.windows.net" , account) ,
195
207
) ) ,
196
208
_ => {
197
209
Err ( AzureError :: GenericErrorWithText (
@@ -219,6 +231,8 @@ pub fn with_emulator(blob_storage_url: &Url, table_storage_url: &Url) -> KeyClie
219
231
debug ! ( "blob_uri == {}" , blob_uri) ;
220
232
let table_uri = format ! ( "{}devstoreaccount1" , table_storage_url. as_str( ) ) ;
221
233
debug ! ( "table_uri == {}" , table_uri) ;
234
+ let queue_uri = format ! ( "{}devstoreaccount1" , table_storage_url. as_str( ) ) ;
235
+ debug ! ( "queue_uri == {}" , queue_uri) ;
222
236
223
237
KeyClient :: new (
224
238
"devstoreaccount1" . to_owned ( ) ,
@@ -228,5 +242,6 @@ pub fn with_emulator(blob_storage_url: &Url, table_storage_url: &Url) -> KeyClie
228
242
client,
229
243
blob_uri,
230
244
table_uri,
245
+ queue_uri,
231
246
)
232
247
}
0 commit comments