Struct ra_ap_completion::ImportEdit[][src]

pub struct ImportEdit {
    pub import_path: ModPath,
    pub import_scope: ImportScope,
    pub import_for_trait_assoc_item: bool,
}

An extra import to add after the completion is applied.

Fields

import_path: ModPathimport_scope: ImportScopeimport_for_trait_assoc_item: bool

Implementations

impl ImportEdit[src]

pub fn to_text_edit(
    &self,
    merge_behavior: Option<MergeBehavior>
) -> Option<TextEdit>
[src]

Attempts to insert the import to the given scope, producing a text edit. May return no edit in edge cases, such as scope already containing the import.

Trait Implementations

impl Clone for ImportEdit[src]

impl Debug for ImportEdit[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Cast for T

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.