pub struct ApplicationMetaData {
pub title: String,
pub description: String,
}
Fields§
§title: String
The title of the application
description: String
The description of the application
Implementations§
Source§impl ApplicationMetaData
impl ApplicationMetaData
Sourcepub fn new(title: String, description: String) -> Self
pub fn new(title: String, description: String) -> Self
Creates new project meta data that is used in the project globally for many different things
Examples found in repository?
examples/project_meta_data.rs (lines 7-10)
5fn main() {
6
7 let meta_data = ApplicationMetaData::new(
8 "Test CLI".to_string(),
9 "A test application".to_string()
10 );
11
12 let mut runner = Runner::new();
13 runner.set_meta_data(meta_data);
14 runner.enable_command_handler(CommandHandlerArguments {
15 commands: vec![],
16 default_no_argument_callback: None,
17 flags: vec![]
18 });
19 runner.run();
20}
Trait Implementations§
Source§impl Clone for ApplicationMetaData
impl Clone for ApplicationMetaData
Source§fn clone(&self) -> ApplicationMetaData
fn clone(&self) -> ApplicationMetaData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ApplicationMetaData
impl RefUnwindSafe for ApplicationMetaData
impl Send for ApplicationMetaData
impl Sync for ApplicationMetaData
impl Unpin for ApplicationMetaData
impl UnwindSafe for ApplicationMetaData
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