Skip to main content

extract_completion_target

Function extract_completion_target 

Source
pub fn extract_completion_target(
    content: &str,
    position: Position,
) -> Option<CompletionTarget>
Expand description

Detect the access operator before the cursor position and extract both the AccessKind and the textual subject to its left.

Returns None when no -> or :: is found (i.e. AccessKind::Other).