pub trait Unquote<'a> {
// Required methods
fn is_quoted(&self) -> bool;
fn unquote(&self) -> Option<&'a str>;
fn unquote_infallible(&self) -> &'a str;
}Expand description
Slice a string between quotes
Required Methods§
Sourcefn is_quoted(&self) -> bool
fn is_quoted(&self) -> bool
Whether the input is quoted. If this is false the fallible methods of this interface will fail.
Sourcefn unquote(&self) -> Option<&'a str>
fn unquote(&self) -> Option<&'a str>
Unquotes a string. If the input is not quoted it is simply returned as-is. If the input is partially quoted on either end that quote is not removed.
Sourcefn unquote_infallible(&self) -> &'a str
fn unquote_infallible(&self) -> &'a str
Unquotes a string. The input must be quoted on each side for Some to be returned