pub struct GraphUnit {
pub id: String,
pub name: String,
pub refs: Vec<String>,
pub test: bool,
}Expand description
One .csproj project as graph.json persists it.
Field order (id, name, refs, test) is significant, and the last two are
omit-when-empty/omit-when-false: a leaf project that references nothing
and is not a test project serializes as just its id and name.
Deliberately NOT project::Unit: that type also carries dir, which is
always id’s parent directory and so is recomputed on read rather than
stored (project::units_from_graph). Nothing about which FILE belongs to
which unit is persisted either – ProjectModel derives that from the
unit list.
Fields§
§id: StringRepo-relative path to the .csproj file, which is also this unit’s
identity – what refs entries name.
name: StringThe project name (the csproj file name without its extension).
refs: Vec<String>The ids of this project’s DIRECT ProjectReference targets, not
transitively closed. Omitted when empty.
test: boolWhether this is a test project. Omitted when false.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphUnit
impl<'de> Deserialize<'de> for GraphUnit
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>,
impl Eq for GraphUnit
impl StructuralPartialEq for GraphUnit
Auto Trait Implementations§
impl Freeze for GraphUnit
impl RefUnwindSafe for GraphUnit
impl Send for GraphUnit
impl Sync for GraphUnit
impl Unpin for GraphUnit
impl UnsafeUnpin for GraphUnit
impl UnwindSafe for GraphUnit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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