Trait CmdlineContent
Source pub trait CmdlineContent {
// Required methods
fn parse(buffer: &str) -> Result<Cmdline, (usize, &'static str)>;
fn render(&self) -> Result<String, &'static str>;
fn add_param(&mut self, key: String, value: Option<String>);
}
Expand description
Basic Cmdline content operations
Parses a UTF8 &str and returns a Cmdline
object
§Arguments
buffer: &str
: the cmdline string
§Returns
A Cmdline
object that represents the contents of the input string
§Errors
Returns a (usize, &’static str) error pointing at the line position of the error as well as an error message
Renders a Cmdline object into a valid cmdline string
§Returns
A String that represents the Cmdline
object
§Errors
Returns error if a parameter has bogus values
Adds a parameter to a Cmdline
§Arguments
key: String
: The parameter name
value: Option<String>
: An optional value
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.