Skip to main content

CompletionContext

Struct CompletionContext 

Source
pub struct CompletionContext<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> CompletionContext<'a>

Source

pub fn from_snapshot( snapshot: &'a DocumentSnapshot, position: Position, ) -> Option<Self>

Source

pub fn prefix(&self) -> &str

Source

pub fn fence(&self) -> &FenceSnapshot

Source

pub fn document_uri(&self) -> &str

Source

pub fn has_parser_backed_facts(&self) -> bool

Source

pub fn fact_source(&self) -> FenceTextIndexSource

Source

pub fn is_source_start(&self) -> bool

Source

pub fn prefix_range(&self) -> Option<Range>

Source

pub fn direction_value_range(&self) -> Option<Range>

Source

pub fn is_block_diagram(&self) -> bool

Source

pub fn operator_range(&self) -> Option<Range>

Source

pub fn shape_value_range(&self) -> Option<Range>

Source

pub fn shape_value_edit(&self, value: &str) -> Option<CompletionTextEditParts>

Source

pub fn shape_trigger_range(&self) -> Option<Range>

Source

pub fn offer_diagram_headers(&self) -> bool

Source

pub fn offer_operator_items(&self) -> bool

Source

pub fn offer_directive_items(&self) -> bool

Source

pub fn offer_direction_items(&self) -> bool

Source

pub fn offer_shape_items(&self) -> bool

Source

pub fn offer_node_items(&self) -> bool

Source

pub fn offer_template_items(&self) -> bool

Source

pub fn offer_frontmatter_items(&self) -> bool

Source

pub fn offer_class_name_items(&self) -> bool

Source

pub fn offer_style_snippet_items(&self) -> bool

Source

pub fn offer_interaction_snippet_items(&self) -> bool

Source

pub fn is_comment_or_directive_line(&self) -> bool

Source

pub fn is_parser_controlled_payload(&self) -> bool

Source

pub fn directive_prefix(&self) -> Option<&'static str>

Source

pub fn node_text_edit_range(&self) -> Option<Range>

Source

pub fn class_name_text_edit_range(&self) -> Option<Range>

Source

pub fn style_text_edit_range(&self) -> Option<Range>

Source

pub fn interaction_text_edit_range(&self) -> Option<Range>

Source

pub fn frontmatter_text_edit_range(&self) -> Option<Range>

Trait Implementations§

Source§

impl<'a> Debug for CompletionContext<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for CompletionContext<'a>

§

impl<'a> RefUnwindSafe for CompletionContext<'a>

§

impl<'a> Send for CompletionContext<'a>

§

impl<'a> Sync for CompletionContext<'a>

§

impl<'a> Unpin for CompletionContext<'a>

§

impl<'a> UnsafeUnpin for CompletionContext<'a>

§

impl<'a> UnwindSafe for CompletionContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.