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 Spanimpl<T, S: Into<String>> ToError<T, S> for TokenTreeimpl<T, U, S: Into<String>> ToError<T, S> for Spanned<U>impl<T, S: Into<String>> ToError<T, S> for Blockimpl<T, S: Into<String>> ToError<T, S> for Exprimpl<T, S: Into<String>> ToError<T, S> for Itemimpl<T, S: Into<String>> ToError<T, S> for Patimpl<T, S: Into<String>> ToError<T, S> for Pathimpl<T, S: Into<String>> ToError<T, S> for Stmtimpl<T, S: Into<String>> ToError<T, S> for Ty