pub struct NewItem { /* private fields */ }Expand description
An item definition for Exceptions::create_item. To change an existing
item, use ExceptionItem::edit.
Implementations§
Source§impl NewItem
impl NewItem
Sourcepub fn new(
list: &ExceptionList,
name: impl Into<String>,
entries: Vec<Entry>,
) -> Self
pub fn new( list: &ExceptionList, name: impl Into<String>, entries: Vec<Entry>, ) -> Self
An item in list. Its entries are combined with AND.
pub fn description(self, description: impl Into<String>) -> Self
Sourcepub fn item_id(self, item_id: impl Into<String>) -> Self
pub fn item_id(self, item_id: impl Into<String>) -> Self
A stable human-readable identifier, generated by Kibana when omitted.
pub fn os_types(self, os_types: Vec<OsType>) -> Self
pub fn comments(self, comments: Vec<Comment>) -> Self
Sourcepub fn expire_time(self, time: impl Into<String>) -> Self
pub fn expire_time(self, time: impl Into<String>) -> Self
An ISO 8601 time after which the item no longer applies.
pub fn meta(self, meta: Map<String, Value>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NewItem
impl RefUnwindSafe for NewItem
impl Send for NewItem
impl Sync for NewItem
impl Unpin for NewItem
impl UnsafeUnpin for NewItem
impl UnwindSafe for NewItem
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