ResultExt

Trait ResultExt 

Source
pub trait ResultExt<T, E> {
    // Required method
    fn to_tool_output(
        self,
        tool: &'static str,
        operation: String,
        location: SourceLocation,
    ) -> ComprehensiveToolOutput<Option<T>>
       where E: Display;
}
Expand description

Extension trait for Result<T, E> to easily convert to ComprehensiveToolOutput

Required Methods§

Source

fn to_tool_output( self, tool: &'static str, operation: String, location: SourceLocation, ) -> ComprehensiveToolOutput<Option<T>>
where E: Display,

Convert a Result to a ComprehensiveToolOutput

Implementations on Foreign Types§

Source§

impl<T, E> ResultExt<T, E> for Result<T, E>

Source§

fn to_tool_output( self, tool: &'static str, operation: String, location: SourceLocation, ) -> ComprehensiveToolOutput<Option<T>>
where E: Display,

Implementors§