pub struct Set<'a> {
pub family: NfFamily,
pub table: Cow<'a, str>,
pub name: Cow<'a, str>,
pub handle: Option<u32>,
pub set_type: SetTypeValue<'a>,
pub policy: Option<SetPolicy>,
pub flags: Option<HashSet<SetFlag>>,
pub elem: Option<Cow<'a, [Expression<'a>]>>,
pub timeout: Option<u32>,
pub gc_interval: Option<u32>,
pub size: Option<u32>,
pub comment: Option<Cow<'a, str>>,
}
Expand description
Named set that holds expression elements.
Fields§
§family: NfFamily
The table’s family.
table: Cow<'a, str>
The table’s name.
name: Cow<'a, str>
The set’s name.
handle: Option<u32>
The set’s handle. For input, it is used by the delete command only.
set_type: SetTypeValue<'a>
The set’s datatype.
The set type might be a string, such as "ipv4_addr"
or an array consisting of strings (for concatenated types).
policy: Option<SetPolicy>
The set’s policy.
flags: Option<HashSet<SetFlag>>
The set’s flags.
elem: Option<Cow<'a, [Expression<'a>]>>
Initial set element(s).
A single set element might be given as string, integer or boolean value for simple cases. If additional properties are required, a formal elem object may be used. Multiple elements may be given in an array.
timeout: Option<u32>
Element timeout in seconds.
gc_interval: Option<u32>
Garbage collector interval in seconds.
size: Option<u32>
Maximum number of elements supported.
comment: Option<Cow<'a, str>>
Optional set comment.
Set comment attribute requires at least nftables 0.9.7 and kernel 5.10
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Set<'a>
impl<'de, 'a> Deserialize<'de> for Set<'a>
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<'a> JsonSchema for Set<'a>
impl<'a> JsonSchema for Set<'a>
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreimpl<'a> Eq for Set<'a>
impl<'a> StructuralPartialEq for Set<'a>
Auto Trait Implementations§
impl<'a> Freeze for Set<'a>
impl<'a> RefUnwindSafe for Set<'a>
impl<'a> Send for Set<'a>
impl<'a> Sync for Set<'a>
impl<'a> Unpin for Set<'a>
impl<'a> UnwindSafe for Set<'a>
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