pub struct OutputTransformer { /* private fields */ }Expand description
Transforms LSP server output to ricecoder models
Implementations§
Source§impl OutputTransformer
impl OutputTransformer
Sourcepub fn with_transforms(custom_transforms: HashMap<String, String>) -> Self
pub fn with_transforms(custom_transforms: HashMap<String, String>) -> Self
Create a transformer with custom transformation functions
Sourcepub fn register_transform(&mut self, name: String, function: String)
pub fn register_transform(&mut self, name: String, function: String)
Register a custom transformation function
Sourcepub fn transform_completion(
&self,
response: &Value,
rules: &CompletionMappingRules,
) -> Result<Vec<Value>>
pub fn transform_completion( &self, response: &Value, rules: &CompletionMappingRules, ) -> Result<Vec<Value>>
Transform a completion response using the provided rules
Sourcepub fn transform_diagnostics(
&self,
response: &Value,
rules: &DiagnosticsMappingRules,
) -> Result<Vec<Value>>
pub fn transform_diagnostics( &self, response: &Value, rules: &DiagnosticsMappingRules, ) -> Result<Vec<Value>>
Transform a diagnostics response using the provided rules
Sourcepub fn transform_hover(
&self,
response: &Value,
rules: &HoverMappingRules,
) -> Result<Value>
pub fn transform_hover( &self, response: &Value, rules: &HoverMappingRules, ) -> Result<Value>
Transform a hover response using the provided rules
Trait Implementations§
Source§impl Clone for OutputTransformer
impl Clone for OutputTransformer
Source§fn clone(&self) -> OutputTransformer
fn clone(&self) -> OutputTransformer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputTransformer
impl Debug for OutputTransformer
Auto Trait Implementations§
impl Freeze for OutputTransformer
impl RefUnwindSafe for OutputTransformer
impl Send for OutputTransformer
impl Sync for OutputTransformer
impl Unpin for OutputTransformer
impl UnwindSafe for OutputTransformer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more