Trait easy_plugin::ToError
[−]
[src]
pub trait ToError<T, S> where S: Into<String> { fn to_error(&self, message: S) -> PluginResult<T>; }
A type that can be extended into a PluginResult<T>
.
Required Methods
fn to_error(&self, message: S) -> PluginResult<T>
Returns an Err
value with the span of this value and the supplied message.
Implementors
impl<T, S: Into<String>> ToError<T, S> for Span
impl<T, S: Into<String>> ToError<T, S> for TokenTree
impl<T, U, S: Into<String>> ToError<T, S> for Spanned<U>
impl<T, S: Into<String>> ToError<T, S> for Block
impl<T, S: Into<String>> ToError<T, S> for Expr
impl<T, S: Into<String>> ToError<T, S> for Item
impl<T, S: Into<String>> ToError<T, S> for Pat
impl<T, S: Into<String>> ToError<T, S> for Path
impl<T, S: Into<String>> ToError<T, S> for Stmt
impl<T, S: Into<String>> ToError<T, S> for Ty