pub struct KeyOn {
pub path_params: Option<SmallVec<[String; 2]>>,
pub query_keys: Option<SmallVec<[String; 2]>>,
pub body_hash: Option<bool>,
pub etag: Option<bool>,
}Fields§
§path_params: Option<SmallVec<[String; 2]>>which params from the path to key on.
i.e /some/path/{key_on_me} OR /some/path/{*key_on_me}
would use { "path_params": ["key_on_me"] }
query_keys: Option<SmallVec<[String; 2]>>which keys from the query to key on.
i.e ?some=123
{ "query_keys": ["some"] }
body_hash: Option<bool>whether to key on a hash of the incoming request body.
etag: Option<bool>whether to check/store the ETag before everything else.
defaults to true if not passed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyOn
impl<'de> Deserialize<'de> for KeyOn
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 JsonSchema for KeyOn
Available on crate feature docs only.
impl JsonSchema for KeyOn
Available on crate feature
docs only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for KeyOn
impl RefUnwindSafe for KeyOn
impl Send for KeyOn
impl Sync for KeyOn
impl Unpin for KeyOn
impl UnsafeUnpin for KeyOn
impl UnwindSafe for KeyOn
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