pub struct NewEntry {
pub id: String,
pub cmd: CommandBody,
pub desc: String,
pub tags: Vec<String>,
pub params: BTreeMap<String, ParamSpec>,
pub danger: bool,
}Expand description
A command on its way into the user’s library.
Carries every field an entry can hold, not only the ones a form asks for. Rewriting an existing entry serialises this whole struct, so anything left out here would be dropped from the file the moment it was edited.
Fields§
§id: String§cmd: CommandBody§desc: String§params: BTreeMap<String, ParamSpec>§danger: boolTrait Implementations§
Auto Trait Implementations§
impl Freeze for NewEntry
impl RefUnwindSafe for NewEntry
impl Send for NewEntry
impl Sync for NewEntry
impl Unpin for NewEntry
impl UnsafeUnpin for NewEntry
impl UnwindSafe for NewEntry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more