struct SnippetDefRepr {
prefix: Vec<String>,
postfix: Vec<String>,
body: Vec<String>,
requires: Vec<String>,
description: Option<String>,
scope: SnippetScopeDef,
}Expand description
Plain deserialization target for SnippetDef. Both the client JSON
config and rust-analyzer.toml configs deserialize a SnippetDef per
map entry, so validating the field combination here (via TryFrom)
covers both config sources instead of only one.
Fields§
§prefix: Vec<String>§postfix: Vec<String>§body: Vec<String>§requires: Vec<String>§description: Option<String>§scope: SnippetScopeDefTrait Implementations§
Source§impl Default for SnippetDefRepr
impl Default for SnippetDefRepr
Source§impl<'de> Deserialize<'de> for SnippetDefReprwhere
SnippetDefRepr: Default,
impl<'de> Deserialize<'de> for SnippetDefReprwhere
SnippetDefRepr: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl TryFrom<SnippetDefRepr> for SnippetDef
impl TryFrom<SnippetDefRepr> for SnippetDef
Auto Trait Implementations§
impl Freeze for SnippetDefRepr
impl RefUnwindSafe for SnippetDefRepr
impl Send for SnippetDefRepr
impl Sync for SnippetDefRepr
impl Unpin for SnippetDefRepr
impl UnsafeUnpin for SnippetDefRepr
impl UnwindSafe for SnippetDefRepr
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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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