Enum hyper::status::StatusCode [-]  [+] [src]

pub enum StatusCode {
    Continue,
    SwitchingProtocols,
    Processing,
    Code103,
    Code104,
    Code105,
    Code106,
    Code107,
    Code108,
    Code109,
    Code110,
    Code111,
    Code112,
    Code113,
    Code114,
    Code115,
    Code116,
    Code117,
    Code118,
    Code119,
    Code120,
    Code121,
    Code122,
    Code123,
    Code124,
    Code125,
    Code126,
    Code127,
    Code128,
    Code129,
    Code130,
    Code131,
    Code132,
    Code133,
    Code134,
    Code135,
    Code136,
    Code137,
    Code138,
    Code139,
    Code140,
    Code141,
    Code142,
    Code143,
    Code144,
    Code145,
    Code146,
    Code147,
    Code148,
    Code149,
    Code150,
    Code151,
    Code152,
    Code153,
    Code154,
    Code155,
    Code156,
    Code157,
    Code158,
    Code159,
    Code160,
    Code161,
    Code162,
    Code163,
    Code164,
    Code165,
    Code166,
    Code167,
    Code168,
    Code169,
    Code170,
    Code171,
    Code172,
    Code173,
    Code174,
    Code175,
    Code176,
    Code177,
    Code178,
    Code179,
    Code180,
    Code181,
    Code182,
    Code183,
    Code184,
    Code185,
    Code186,
    Code187,
    Code188,
    Code189,
    Code190,
    Code191,
    Code192,
    Code193,
    Code194,
    Code195,
    Code196,
    Code197,
    Code198,
    Code199,
    Ok,
    Created,
    Accepted,
    NonAuthoritativeInformation,
    NoContent,
    ResetContent,
    PartialContent,
    MultiStatus,
    AlreadyReported,
    Code209,
    Code210,
    Code211,
    Code212,
    Code213,
    Code214,
    Code215,
    Code216,
    Code217,
    Code218,
    Code219,
    Code220,
    Code221,
    Code222,
    Code223,
    Code224,
    Code225,
    ImUsed,
    Code227,
    Code228,
    Code229,
    Code230,
    Code231,
    Code232,
    Code233,
    Code234,
    Code235,
    Code236,
    Code237,
    Code238,
    Code239,
    Code240,
    Code241,
    Code242,
    Code243,
    Code244,
    Code245,
    Code246,
    Code247,
    Code248,
    Code249,
    Code250,
    Code251,
    Code252,
    Code253,
    Code254,
    Code255,
    Code256,
    Code257,
    Code258,
    Code259,
    Code260,
    Code261,
    Code262,
    Code263,
    Code264,
    Code265,
    Code266,
    Code267,
    Code268,
    Code269,
    Code270,
    Code271,
    Code272,
    Code273,
    Code274,
    Code275,
    Code276,
    Code277,
    Code278,
    Code279,
    Code280,
    Code281,
    Code282,
    Code283,
    Code284,
    Code285,
    Code286,
    Code287,
    Code288,
    Code289,
    Code290,
    Code291,
    Code292,
    Code293,
    Code294,
    Code295,
    Code296,
    Code297,
    Code298,
    Code299,
    MultipleChoices,
    MovedPermanently,
    Found,
    SeeOther,
    NotModified,
    UseProxy,
    SwitchProxy,
    TemporaryRedirect,
    PermanentRedirect,
    Code309,
    Code310,
    Code311,
    Code312,
    Code313,
    Code314,
    Code315,
    Code316,
    Code317,
    Code318,
    Code319,
    Code320,
    Code321,
    Code322,
    Code323,
    Code324,
    Code325,
    Code326,
    Code327,
    Code328,
    Code329,
    Code330,
    Code331,
    Code332,
    Code333,
    Code334,
    Code335,
    Code336,
    Code337,
    Code338,
    Code339,
    Code340,
    Code341,
    Code342,
    Code343,
    Code344,
    Code345,
    Code346,
    Code347,
    Code348,
    Code349,
    Code350,
    Code351,
    Code352,
    Code353,
    Code354,
    Code355,
    Code356,
    Code357,
    Code358,
    Code359,
    Code360,
    Code361,
    Code362,
    Code363,
    Code364,
    Code365,
    Code366,
    Code367,
    Code368,
    Code369,
    Code370,
    Code371,
    Code372,
    Code373,
    Code374,
    Code375,
    Code376,
    Code377,
    Code378,
    Code379,
    Code380,
    Code381,
    Code382,
    Code383,
    Code384,
    Code385,
    Code386,
    Code387,
    Code388,
    Code389,
    Code390,
    Code391,
    Code392,
    Code393,
    Code394,
    Code395,
    Code396,
    Code397,
    Code398,
    Code399,
    BadRequest,
    Unauthorized,
    PaymentRequired,
    Forbidden,
    NotFound,
    MethodNotAllowed,
    NotAcceptable,
    ProxyAuthenticationRequired,
    RequestTimeout,
    Conflict,
    Gone,
    LengthRequired,
    PreconditionFailed,
    RequestEntityTooLarge,
    RequestUriTooLong,
    UnsupportedMediaType,
    RequestedRangeNotSatisfiable,
    ExpectationFailed,
    ImATeapot,
    AuthenticationTimeout,
    Code420,
    Code421,
    UnprocessableEntity,
    Locked,
    FailedDependency,
    UnorderedCollection,
    UpgradeRequired,
    Code427,
    PreconditionRequired,
    TooManyRequests,
    Code430,
    RequestHeaderFieldsTooLarge,
    Code432,
    Code433,
    Code434,
    Code435,
    Code436,
    Code437,
    Code438,
    Code439,
    Code440,
    Code441,
    Code442,
    Code443,
    Code444,
    Code445,
    Code446,
    Code447,
    Code448,
    Code449,
    Code450,
    UnavailableForLegalReasons,
    Code452,
    Code453,
    Code454,
    Code455,
    Code456,
    Code457,
    Code458,
    Code459,
    Code460,
    Code461,
    Code462,
    Code463,
    Code464,
    Code465,
    Code466,
    Code467,
    Code468,
    Code469,
    Code470,
    Code471,
    Code472,
    Code473,
    Code474,
    Code475,
    Code476,
    Code477,
    Code478,
    Code479,
    Code480,
    Code481,
    Code482,
    Code483,
    Code484,
    Code485,
    Code486,
    Code487,
    Code488,
    Code489,
    Code490,
    Code491,
    Code492,
    Code493,
    Code494,
    Code495,
    Code496,
    Code497,
    Code498,
    Code499,
    InternalServerError,
    NotImplemented,
    BadGateway,
    ServiceUnavailable,
    GatewayTimeout,
    HttpVersionNotSupported,
    VariantAlsoNegotiates,
    InsufficientStorage,
    LoopDetected,
    Code509,
    NotExtended,
    NetworkAuthenticationRequired,
    Code512,
    Code513,
    Code514,
    Code515,
    Code516,
    Code517,
    Code518,
    Code519,
    Code520,
    Code521,
    Code522,
    Code523,
    Code524,
    Code525,
    Code526,
    Code527,
    Code528,
    Code529,
    Code530,
    Code531,
    Code532,
    Code533,
    Code534,
    Code535,
    Code536,
    Code537,
    Code538,
    Code539,
    Code540,
    Code541,
    Code542,
    Code543,
    Code544,
    Code545,
    Code546,
    Code547,
    Code548,
    Code549,
    Code550,
    Code551,
    Code552,
    Code553,
    Code554,
    Code555,
    Code556,
    Code557,
    Code558,
    Code559,
    Code560,
    Code561,
    Code562,
    Code563,
    Code564,
    Code565,
    Code566,
    Code567,
    Code568,
    Code569,
    Code570,
    Code571,
    Code572,
    Code573,
    Code574,
    Code575,
    Code576,
    Code577,
    Code578,
    Code579,
    Code580,
    Code581,
    Code582,
    Code583,
    Code584,
    Code585,
    Code586,
    Code587,
    Code588,
    Code589,
    Code590,
    Code591,
    Code592,
    Code593,
    Code594,
    Code595,
    Code596,
    Code597,
    Code598,
    Code599,
}

An HTTP status code (Status-Code in RFC 2616).

This enum is absolutely exhaustive, covering all 500 possible values (100–599).

For HTTP/2.0, statuses belonging to the 1xx Informational class are invalid.

As this is a C‐style enum with each variant having a corresponding value, you may use the likes of Continue as u16 to retreive the value 100u16. Normally, though, you should not need to do any such thing; just use the status code as a StatusCode.

If you encounter a status code that you do not know how to deal with, you should treat it as the x00 status code—e.g. for code 123, treat it as 100 (Continue). This can be achieved with self.class().default_code():

assert_eq!(Code123.class().default_code(), Continue);

Variants

Continue

100 Continue

SwitchingProtocols

101 Switching Protocols

Processing

102 Processing

Code103

103 (unregistered)

Code104

104 (unregistered)

Code105

105 (unregistered)

Code106

106 (unregistered)

Code107

107 (unregistered)

Code108

108 (unregistered)

Code109

109 (unregistered)

Code110

110 (unregistered)

Code111

111 (unregistered)

Code112

112 (unregistered)

Code113

113 (unregistered)

Code114

114 (unregistered)

Code115

115 (unregistered)

Code116

116 (unregistered)

Code117

117 (unregistered)

Code118

118 (unregistered)

Code119

119 (unregistered)

Code120

120 (unregistered)

Code121

121 (unregistered)

Code122

122 (unregistered)

Code123

123 (unregistered)

Code124

124 (unregistered)

Code125

125 (unregistered)

Code126

126 (unregistered)

Code127

127 (unregistered)

Code128

128 (unregistered)

Code129

129 (unregistered)

Code130

130 (unregistered)

Code131

131 (unregistered)

Code132

132 (unregistered)

Code133

133 (unregistered)

Code134

134 (unregistered)

Code135

135 (unregistered)

Code136

136 (unregistered)

Code137

137 (unregistered)

Code138

138 (unregistered)

Code139

139 (unregistered)

Code140

140 (unregistered)

Code141

141 (unregistered)

Code142

142 (unregistered)

Code143

143 (unregistered)

Code144

144 (unregistered)

Code145

145 (unregistered)

Code146

146 (unregistered)

Code147

147 (unregistered)

Code148

148 (unregistered)

Code149

149 (unregistered)

Code150

150 (unregistered)

Code151

151 (unregistered)

Code152

152 (unregistered)

Code153

153 (unregistered)

Code154

154 (unregistered)

Code155

155 (unregistered)

Code156

156 (unregistered)

Code157

157 (unregistered)

Code158

158 (unregistered)

Code159

159 (unregistered)

Code160

160 (unregistered)

Code161

161 (unregistered)

Code162

162 (unregistered)

Code163

163 (unregistered)

Code164

164 (unregistered)

Code165

165 (unregistered)

Code166

166 (unregistered)

Code167

167 (unregistered)

Code168

168 (unregistered)

Code169

169 (unregistered)

Code170

170 (unregistered)

Code171

171 (unregistered)

Code172

172 (unregistered)

Code173

173 (unregistered)

Code174

174 (unregistered)

Code175

175 (unregistered)

Code176

176 (unregistered)

Code177

177 (unregistered)

Code178

178 (unregistered)

Code179

179 (unregistered)

Code180

180 (unregistered)

Code181

181 (unregistered)

Code182

182 (unregistered)

Code183

183 (unregistered)

Code184

184 (unregistered)

Code185

185 (unregistered)

Code186

186 (unregistered)

Code187

187 (unregistered)

Code188

188 (unregistered)

Code189

189 (unregistered)

Code190

190 (unregistered)

Code191

191 (unregistered)

Code192

192 (unregistered)

Code193

193 (unregistered)

Code194

194 (unregistered)

Code195

195 (unregistered)

Code196

196 (unregistered)

Code197

197 (unregistered)

Code198

198 (unregistered)

Code199

199 (unregistered)

Ok

200 OK

Created

201 Created

Accepted

202 Accepted

NonAuthoritativeInformation

203 Non-Authoritative Information

NoContent

204 No Content

ResetContent

205 Reset Content

PartialContent

206 Partial Content

MultiStatus

207 Multi-Status

AlreadyReported

208 Already Reported

Code209

209 (unregistered)

Code210

210 (unregistered)

Code211

211 (unregistered)

Code212

212 (unregistered)

Code213

213 (unregistered)

Code214

214 (unregistered)

Code215

215 (unregistered)

Code216

216 (unregistered)

Code217

217 (unregistered)

Code218

218 (unregistered)

Code219

219 (unregistered)

Code220

220 (unregistered)

Code221

221 (unregistered)

Code222

222 (unregistered)

Code223

223 (unregistered)

Code224

224 (unregistered)

Code225

225 (unregistered)

ImUsed

226 IM Used

Code227

227 (unregistered)

Code228

228 (unregistered)

Code229

229 (unregistered)

Code230

230 (unregistered)

Code231

231 (unregistered)

Code232

232 (unregistered)

Code233

233 (unregistered)

Code234

234 (unregistered)

Code235

235 (unregistered)

Code236

236 (unregistered)

Code237

237 (unregistered)

Code238

238 (unregistered)

Code239

239 (unregistered)

Code240

240 (unregistered)

Code241

241 (unregistered)

Code242

242 (unregistered)

Code243

243 (unregistered)

Code244

244 (unregistered)

Code245

245 (unregistered)

Code246

246 (unregistered)

Code247

247 (unregistered)

Code248

248 (unregistered)

Code249

249 (unregistered)

Code250

250 (unregistered)

Code251

251 (unregistered)

Code252

252 (unregistered)

Code253

253 (unregistered)

Code254

254 (unregistered)

Code255

255 (unregistered)

Code256

256 (unregistered)

Code257

257 (unregistered)

Code258

258 (unregistered)

Code259

259 (unregistered)

Code260

260 (unregistered)

Code261

261 (unregistered)

Code262

262 (unregistered)

Code263

263 (unregistered)

Code264

264 (unregistered)

Code265

265 (unregistered)

Code266

266 (unregistered)

Code267

267 (unregistered)

Code268

268 (unregistered)

Code269

269 (unregistered)

Code270

270 (unregistered)

Code271

271 (unregistered)

Code272

272 (unregistered)

Code273

273 (unregistered)

Code274

274 (unregistered)

Code275

275 (unregistered)

Code276

276 (unregistered)

Code277

277 (unregistered)

Code278

278 (unregistered)

Code279

279 (unregistered)

Code280

280 (unregistered)

Code281

281 (unregistered)

Code282

282 (unregistered)

Code283

283 (unregistered)

Code284

284 (unregistered)

Code285

285 (unregistered)

Code286

286 (unregistered)

Code287

287 (unregistered)

Code288

288 (unregistered)

Code289

289 (unregistered)

Code290

290 (unregistered)

Code291

291 (unregistered)

Code292

292 (unregistered)

Code293

293 (unregistered)

Code294

294 (unregistered)

Code295

295 (unregistered)

Code296

296 (unregistered)

Code297

297 (unregistered)

Code298

298 (unregistered)

Code299

299 (unregistered)

MultipleChoices

300 Multiple Choices

MovedPermanently

301 Moved Permanently

Found

302 Found

SeeOther

303 See Other

NotModified

304 Not Modified

UseProxy

305 Use Proxy

SwitchProxy

306 Switch Proxy

TemporaryRedirect

307 Temporary Redirect

PermanentRedirect

308 Permanent Redirect

Code309

309 (unregistered)

Code310

310 (unregistered)

Code311

311 (unregistered)

Code312

312 (unregistered)

Code313

313 (unregistered)

Code314

314 (unregistered)

Code315

315 (unregistered)

Code316

316 (unregistered)

Code317

317 (unregistered)

Code318

318 (unregistered)

Code319

319 (unregistered)

Code320

320 (unregistered)

Code321

321 (unregistered)

Code322

322 (unregistered)

Code323

323 (unregistered)

Code324

324 (unregistered)

Code325

325 (unregistered)

Code326

326 (unregistered)

Code327

327 (unregistered)

Code328

328 (unregistered)

Code329

329 (unregistered)

Code330

330 (unregistered)

Code331

331 (unregistered)

Code332

332 (unregistered)

Code333

333 (unregistered)

Code334

334 (unregistered)

Code335

335 (unregistered)

Code336

336 (unregistered)

Code337

337 (unregistered)

Code338

338 (unregistered)

Code339

339 (unregistered)

Code340

340 (unregistered)

Code341

341 (unregistered)

Code342

342 (unregistered)

Code343

343 (unregistered)

Code344

344 (unregistered)

Code345

345 (unregistered)

Code346

346 (unregistered)

Code347

347 (unregistered)

Code348

348 (unregistered)

Code349

349 (unregistered)

Code350

350 (unregistered)

Code351

351 (unregistered)

Code352

352 (unregistered)

Code353

353 (unregistered)

Code354

354 (unregistered)

Code355

355 (unregistered)

Code356

356 (unregistered)

Code357

357 (unregistered)

Code358

358 (unregistered)

Code359

359 (unregistered)

Code360

360 (unregistered)

Code361

361 (unregistered)

Code362

362 (unregistered)

Code363

363 (unregistered)

Code364

364 (unregistered)

Code365

365 (unregistered)

Code366

366 (unregistered)

Code367

367 (unregistered)

Code368

368 (unregistered)

Code369

369 (unregistered)

Code370

370 (unregistered)

Code371

371 (unregistered)

Code372

372 (unregistered)

Code373

373 (unregistered)

Code374

374 (unregistered)

Code375

375 (unregistered)

Code376

376 (unregistered)

Code377

377 (unregistered)

Code378

378 (unregistered)

Code379

379 (unregistered)

Code380

380 (unregistered)

Code381

381 (unregistered)

Code382

382 (unregistered)

Code383

383 (unregistered)

Code384

384 (unregistered)

Code385

385 (unregistered)

Code386

386 (unregistered)

Code387

387 (unregistered)

Code388

388 (unregistered)

Code389

389 (unregistered)

Code390

390 (unregistered)

Code391

391 (unregistered)

Code392

392 (unregistered)

Code393

393 (unregistered)

Code394

394 (unregistered)

Code395

395 (unregistered)

Code396

396 (unregistered)

Code397

397 (unregistered)

Code398

398 (unregistered)

Code399

399 (unregistered)

BadRequest

400 Bad Request

Unauthorized

401 Unauthorized

PaymentRequired

402 Payment Required

Forbidden

403 Forbidden

NotFound

404 Not Found

MethodNotAllowed

405 Method Not Allowed

NotAcceptable

406 Not Acceptable

ProxyAuthenticationRequired

407 Proxy Authentication Required

RequestTimeout

408 Request Timeout

Conflict

409 Conflict

Gone

410 Gone

LengthRequired

411 Length Required

PreconditionFailed

412 Precondition Failed

RequestEntityTooLarge

413 Request Entity Too Large

RequestUriTooLong

414 Request-URI Too Long

UnsupportedMediaType

415 Unsupported Media Type

RequestedRangeNotSatisfiable

416 Requested Range Not Satisfiable

ExpectationFailed

417 Expectation Failed

ImATeapot

418 I'm a teapot

AuthenticationTimeout

419 Authentication Timeout

Code420

420 (unregistered)

Code421

421 (unregistered)

UnprocessableEntity

422 Unprocessable Entity

Locked

423 Locked

FailedDependency

424 Failed Dependency

UnorderedCollection

425 Unordered Collection

UpgradeRequired

426 Upgrade Required

Code427

427 (unregistered)

PreconditionRequired

428 Precondition Required

TooManyRequests

429 Too Many Requests

Code430

430 (unregistered)

RequestHeaderFieldsTooLarge

431 Request Header Fields Too Large

Code432

432 (unregistered)

Code433

433 (unregistered)

Code434

434 (unregistered)

Code435

435 (unregistered)

Code436

436 (unregistered)

Code437

437 (unregistered)

Code438

438 (unregistered)

Code439

439 (unregistered)

Code440

440 (unregistered)

Code441

441 (unregistered)

Code442

442 (unregistered)

Code443

443 (unregistered)

Code444

444 (unregistered)

Code445

445 (unregistered)

Code446

446 (unregistered)

Code447

447 (unregistered)

Code448

448 (unregistered)

Code449

449 (unregistered)

Code450

450 (unregistered)

UnavailableForLegalReasons

451 Unavailable For Legal Reasons

Code452

452 (unregistered)

Code453

453 (unregistered)

Code454

454 (unregistered)

Code455

455 (unregistered)

Code456

456 (unregistered)

Code457

457 (unregistered)

Code458

458 (unregistered)

Code459

459 (unregistered)

Code460

460 (unregistered)

Code461

461 (unregistered)

Code462

462 (unregistered)

Code463

463 (unregistered)

Code464

464 (unregistered)

Code465

465 (unregistered)

Code466

466 (unregistered)

Code467

467 (unregistered)

Code468

468 (unregistered)

Code469

469 (unregistered)

Code470

470 (unregistered)

Code471

471 (unregistered)

Code472

472 (unregistered)

Code473

473 (unregistered)

Code474

474 (unregistered)

Code475

475 (unregistered)

Code476

476 (unregistered)

Code477

477 (unregistered)

Code478

478 (unregistered)

Code479

479 (unregistered)

Code480

480 (unregistered)

Code481

481 (unregistered)

Code482

482 (unregistered)

Code483

483 (unregistered)

Code484

484 (unregistered)

Code485

485 (unregistered)

Code486

486 (unregistered)

Code487

487 (unregistered)

Code488

488 (unregistered)

Code489

489 (unregistered)

Code490

490 (unregistered)

Code491

491 (unregistered)

Code492

492 (unregistered)

Code493

493 (unregistered)

Code494

494 (unregistered)

Code495

495 (unregistered)

Code496

496 (unregistered)

Code497

497 (unregistered)

Code498

498 (unregistered)

Code499

499 (unregistered)

InternalServerError

500 Internal Server Error

NotImplemented

501 Not Implemented

BadGateway

502 Bad Gateway

ServiceUnavailable

503 Service Unavailable

GatewayTimeout

504 Gateway Timeout

HttpVersionNotSupported

505 HTTP Version Not Supported

VariantAlsoNegotiates

506 Variant Also Negotiates

InsufficientStorage

507 Insufficient Storage

LoopDetected

508 Loop Detected

Code509

509 (unregistered)

NotExtended

510 Not Extended

NetworkAuthenticationRequired

511 Network Authentication Required

Code512

512 (unregistered)

Code513

513 (unregistered)

Code514

514 (unregistered)

Code515

515 (unregistered)

Code516

516 (unregistered)

Code517

517 (unregistered)

Code518

518 (unregistered)

Code519

519 (unregistered)

Code520

520 (unregistered)

Code521

521 (unregistered)

Code522

522 (unregistered)

Code523

523 (unregistered)

Code524

524 (unregistered)

Code525

525 (unregistered)

Code526

526 (unregistered)

Code527

527 (unregistered)

Code528

528 (unregistered)

Code529

529 (unregistered)

Code530

530 (unregistered)

Code531

531 (unregistered)

Code532

532 (unregistered)

Code533

533 (unregistered)

Code534

534 (unregistered)

Code535

535 (unregistered)

Code536

536 (unregistered)

Code537

537 (unregistered)

Code538

538 (unregistered)

Code539

539 (unregistered)

Code540

540 (unregistered)

Code541

541 (unregistered)

Code542

542 (unregistered)

Code543

543 (unregistered)

Code544

544 (unregistered)

Code545

545 (unregistered)

Code546

546 (unregistered)

Code547

547 (unregistered)

Code548

548 (unregistered)

Code549

549 (unregistered)

Code550

550 (unregistered)

Code551

551 (unregistered)

Code552

552 (unregistered)

Code553

553 (unregistered)

Code554

554 (unregistered)

Code555

555 (unregistered)

Code556

556 (unregistered)

Code557

557 (unregistered)

Code558

558 (unregistered)

Code559

559 (unregistered)

Code560

560 (unregistered)

Code561

561 (unregistered)

Code562

562 (unregistered)

Code563

563 (unregistered)

Code564

564 (unregistered)

Code565

565 (unregistered)

Code566

566 (unregistered)

Code567

567 (unregistered)

Code568

568 (unregistered)

Code569

569 (unregistered)

Code570

570 (unregistered)

Code571

571 (unregistered)

Code572

572 (unregistered)

Code573

573 (unregistered)

Code574

574 (unregistered)

Code575

575 (unregistered)

Code576

576 (unregistered)

Code577

577 (unregistered)

Code578

578 (unregistered)

Code579

579 (unregistered)

Code580

580 (unregistered)

Code581

581 (unregistered)

Code582

582 (unregistered)

Code583

583 (unregistered)

Code584

584 (unregistered)

Code585

585 (unregistered)

Code586

586 (unregistered)

Code587

587 (unregistered)

Code588

588 (unregistered)

Code589

589 (unregistered)

Code590

590 (unregistered)

Code591

591 (unregistered)

Code592

592 (unregistered)

Code593

593 (unregistered)

Code594

594 (unregistered)

Code595

595 (unregistered)

Code596

596 (unregistered)

Code597

597 (unregistered)

Code598

598 (unregistered)

Code599

599 (unregistered)

Methods

impl StatusCode

fn canonical_reason(&self) -> Option<&'static str>

Get the standardised Reason-Phrase for this status code.

This is mostly here for servers writing responses, but could potentially have application at other times.

The reason phrase is defined as being exclusively for human readers. You should avoid derive any meaning from it at all costs.

Bear in mind also that in HTTP/2.0 the reason phrase is abolished from transmission, and so this canonical reason phrase really is the only reason phrase you’ll find.

fn class(&self) -> StatusClass

Determine the class of a status code, based on its first digit.

Trait Implementations

impl Copy for StatusCode

impl String for StatusCode

Formats the status code, including the canonical reason.

assert_eq!(&format!("{}", ImATeapot)[],
           "418 I'm a teapot");
assert_eq!(&format!("{}", Code123)[],
           "123 <unknown status code>");

If you wish to just include the number, cast to a u16 instead.

fn fmt(&self, f: &mut Formatter) -> Result

impl PartialEq for StatusCode

fn eq(&self, other: &StatusCode) -> bool

fn ne(&self, other: &Rhs) -> bool

impl Eq for StatusCode

fn assert_receiver_is_total_eq(&self)

impl Clone for StatusCode

fn clone(&self) -> StatusCode

fn clone_from(&mut self, source: &Self)

impl FromPrimitive for StatusCode

fn from_i64(n: i64) -> Option<StatusCode>

fn from_u64(n: u64) -> Option<StatusCode>

fn from_int(n: isize) -> Option<Self>

fn from_i8(n: i8) -> Option<Self>

fn from_i16(n: i16) -> Option<Self>

fn from_i32(n: i32) -> Option<Self>

fn from_uint(n: usize) -> Option<Self>

fn from_u8(n: u8) -> Option<Self>

fn from_u16(n: u16) -> Option<Self>

fn from_u32(n: u32) -> Option<Self>

fn from_f32(n: f32) -> Option<Self>

fn from_f64(n: f64) -> Option<Self>

impl PartialOrd for StatusCode

fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>

fn lt(&self, other: &Rhs) -> bool

fn le(&self, other: &Rhs) -> bool

fn gt(&self, other: &Rhs) -> bool

fn ge(&self, other: &Rhs) -> bool

impl Ord for StatusCode

fn cmp(&self, other: &StatusCode) -> Ordering

impl ToPrimitive for StatusCode

fn to_i64(&self) -> Option<i64>

fn to_u64(&self) -> Option<u64>

fn to_int(&self) -> Option<isize>

fn to_i8(&self) -> Option<i8>

fn to_i16(&self) -> Option<i16>

fn to_i32(&self) -> Option<i32>

fn to_uint(&self) -> Option<usize>

fn to_u8(&self) -> Option<u8>

fn to_u16(&self) -> Option<u16>

fn to_u32(&self) -> Option<u32>

fn to_f32(&self) -> Option<f32>

fn to_f64(&self) -> Option<f64>

Derived Implementations

impl Show for StatusCode

fn fmt(&self, __arg_0: &mut Formatter) -> Result