@@ -54,7 +54,7 @@ fn indent_trimmed(s: &str, prefix: &str) -> String {
54
54
}
55
55
56
56
/// The documentation provided by a user for a specific module, object, function, etc.
57
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Trace ) ]
57
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Trace , Default ) ]
58
58
pub struct DocString {
59
59
/// The first line of a doc string. This has whitespace trimmed from it.
60
60
pub summary : String ,
@@ -355,7 +355,7 @@ impl DocString {
355
355
}
356
356
357
357
/// Line / column for where in a file a symbol is.
358
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
358
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
359
359
pub struct Pos {
360
360
/// Line number, zero based.
361
361
pub line : usize ,
@@ -364,7 +364,7 @@ pub struct Pos {
364
364
}
365
365
366
366
/// The file a symbol resides in, and if available its location within that file.
367
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
367
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
368
368
pub struct Location {
369
369
/// `path` is a string that can be passed into `load()` statements.
370
370
pub path : String ,
@@ -373,7 +373,7 @@ pub struct Location {
373
373
}
374
374
375
375
/// The main identifier for a symbol.
376
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
376
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
377
377
pub struct Identifier {
378
378
/// The name of the symbol (e.g. the function name, a name or path for a module, etc).
379
379
pub name : String ,
@@ -382,14 +382,14 @@ pub struct Identifier {
382
382
}
383
383
384
384
/// The type of a given parameter, field, etc.
385
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
385
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
386
386
pub struct Type {
387
387
/// The type string that one would find in a starlark expression.
388
388
pub raw_type : String ,
389
389
}
390
390
391
391
/// Documents a full module.
392
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
392
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
393
393
pub struct Module {
394
394
/// In general, this should be the first statement of a loaded file, if that statement is
395
395
/// a string literal.
@@ -406,7 +406,7 @@ impl Module {
406
406
}
407
407
408
408
/// Documents a single function.
409
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
409
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
410
410
pub struct Function {
411
411
/// Documentation for the function. If parsed, this should generally be the first statement
412
412
/// of a function's body if that statement is a string literal. Any sections like "Args:",
@@ -669,7 +669,7 @@ impl Param {
669
669
}
670
670
671
671
/// Details about the return value of a function.
672
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
672
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
673
673
pub struct Return {
674
674
/// Extra semantic details around the returned value's meaning.
675
675
pub docs : Option < DocString > ,
@@ -684,7 +684,7 @@ impl Return {
684
684
}
685
685
686
686
/// A single property of an object. These are explicitly not functions (see [`Member`]).
687
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
687
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
688
688
pub struct Property {
689
689
pub docs : Option < DocString > ,
690
690
#[ serde( rename = "type" ) ]
@@ -724,7 +724,7 @@ pub enum Member {
724
724
}
725
725
726
726
/// An object with named functions/properties.
727
- #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
727
+ #[ derive( Debug , Clone , PartialEq , Serialize , Deserialize , Default ) ]
728
728
pub struct Object {
729
729
pub docs : Option < DocString > ,
730
730
/// Name and details of each member of this object.
0 commit comments