feat: add getters
This commit is contained in:
parent
a2a9be299b
commit
2a358b61a2
@ -27,6 +27,27 @@ impl Script {
|
||||
&self.path
|
||||
}
|
||||
|
||||
pub fn parameters(&self) -> &Vec<Parameter> {
|
||||
&self.parameters
|
||||
}
|
||||
|
||||
pub fn default_parameter_set(&self) -> Option<&str> {
|
||||
self.default_parameter_set.as_ref().map(|x| x as _)
|
||||
}
|
||||
|
||||
pub fn help_uri(&self) -> Option<&str> {
|
||||
self.help_uri.as_ref().map(|x| x as _)
|
||||
}
|
||||
pub fn supports_paging(&self) -> Option<&str> {
|
||||
self.supports_paging.as_ref().map(|x| x as _)
|
||||
}
|
||||
pub fn supports_should_process(&self) -> Option<bool> {
|
||||
self.supports_should_process
|
||||
}
|
||||
pub fn positional_binding(&self) -> Option<bool> {
|
||||
self.positional_binding
|
||||
}
|
||||
|
||||
pub fn from_file<P: AsRef<str>>(path: P) -> Result<Self, String> {
|
||||
let func = get_parse_function();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user