pub enum CompletionContext {
FunctionSignature {
function_name: String,
function_line: usize,
is_fixture: bool,
declared_params: Vec<String>,
fixture_scope: Option<FixtureScope>,
},
FunctionBody {
function_name: String,
function_line: usize,
is_fixture: bool,
declared_params: Vec<String>,
fixture_scope: Option<FixtureScope>,
},
UsefixturesDecorator,
ParametrizeIndirect,
}Expand description
Context for code completion.
Variants§
FunctionSignature
Inside a function signature (parameter list) - suggest fixtures as parameters.
Fields
§
fixture_scope: Option<FixtureScope>The fixture’s scope if inside a fixture function, None for test functions.
FunctionBody
Inside a function body - suggest fixtures with auto-add to parameters.
Fields
§
fixture_scope: Option<FixtureScope>The fixture’s scope if inside a fixture function, None for test functions.
UsefixturesDecorator
Inside @pytest.mark.usefixtures(“…”) decorator - suggest fixture names as strings.
ParametrizeIndirect
Inside @pytest.mark.parametrize(…, indirect=…) - suggest fixture names as strings.
Trait Implementations§
Source§impl Clone for CompletionContext
impl Clone for CompletionContext
Source§fn clone(&self) -> CompletionContext
fn clone(&self) -> CompletionContext
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 CompletionContext
impl Debug for CompletionContext
Source§impl PartialEq for CompletionContext
impl PartialEq for CompletionContext
impl StructuralPartialEq for CompletionContext
Auto Trait Implementations§
impl Freeze for CompletionContext
impl RefUnwindSafe for CompletionContext
impl Send for CompletionContext
impl Sync for CompletionContext
impl Unpin for CompletionContext
impl UnsafeUnpin for CompletionContext
impl UnwindSafe for CompletionContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more