[][src]Type Definition rocket_cors::AllowedMethods

type AllowedMethods = HashSet<Method>;

A list of allowed methods

The list of methods is whatever is supported by Rocket.

Example

use std::str::FromStr;
use rocket_cors::AllowedMethods;

let allowed_methods: AllowedMethods = ["Get", "Post", "Delete"]
   .iter()
   .map(|s| FromStr::from_str(s).unwrap())
   .collect();