#[non_exhaustive]pub struct InputAdmissionConfig {
pub enabled: bool,
pub reject_empty: bool,
pub deduplicate: bool,
pub max_length: usize,
}Expand description
Configuration for input admission.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: boolWhether admission is enabled.
reject_empty: boolWhether to reject empty inputs.
deduplicate: boolWhether to deduplicate inputs within a session.
max_length: usizeMaximum input length (0 = unlimited).
Implementations§
Source§impl InputAdmissionConfig
impl InputAdmissionConfig
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Sets whether admission is enabled.
Sourcepub fn with_reject_empty(self, reject_empty: bool) -> Self
pub fn with_reject_empty(self, reject_empty: bool) -> Self
Sets whether to reject empty inputs.
Sourcepub fn with_deduplicate(self, deduplicate: bool) -> Self
pub fn with_deduplicate(self, deduplicate: bool) -> Self
Sets whether to deduplicate inputs.
Sourcepub fn with_max_length(self, max_length: usize) -> Self
pub fn with_max_length(self, max_length: usize) -> Self
Sets the maximum input length.
Trait Implementations§
Source§impl Clone for InputAdmissionConfig
impl Clone for InputAdmissionConfig
Source§fn clone(&self) -> InputAdmissionConfig
fn clone(&self) -> InputAdmissionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InputAdmissionConfig
impl Debug for InputAdmissionConfig
Source§impl Default for InputAdmissionConfig
impl Default for InputAdmissionConfig
Source§impl<'de> Deserialize<'de> for InputAdmissionConfig
impl<'de> Deserialize<'de> for InputAdmissionConfig
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
Auto Trait Implementations§
impl Freeze for InputAdmissionConfig
impl RefUnwindSafe for InputAdmissionConfig
impl Send for InputAdmissionConfig
impl Sync for InputAdmissionConfig
impl Unpin for InputAdmissionConfig
impl UnsafeUnpin for InputAdmissionConfig
impl UnwindSafe for InputAdmissionConfig
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