github_workflow_update/entity.rs
1// Copyright (C) 2022 Leandro Lisboa Penz <lpenz@lpenz.org>
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4
5//! The [`Entity`] type.
6use crate::version::Version;
7
8/// A "versionable" entity
9#[derive(Debug, PartialEq, Eq, Hash, Default)]
10pub struct Entity {
11 /// The whole entity-describing string
12 pub line: String,
13 /// The resource part - `reference` without the version
14 pub resource: String,
15 /// The current version
16 pub version: Version,
17 /// The latest version
18 pub latest: Option<Version>,
19 /// The updated entity-describing string
20 pub updated_line: Option<String>,
21}