Add the serde 'twins' (Serialize + Deserialize) to every public struct and enum in src/*/types.rs so data types can be serialized via JSON, bincode, postcard, etc. Dependency changes: - enable 'serde' feature on gix (for gix::ObjectId) - enable 'serde' feature on time (for time::OffsetDateTime) Skipped: - src/archive/types.rs::ChildArchiveReader<R> — contains a tokio::process::Child field, semantically not serializable Coverage (18 modules): archive, blame, blob, branch, cleanup, commit, compare, config, conflict, diff, merge, refs, remote, setup, submodule, tags, tree Notes: - field names kept snake_case (no rename_all remap) - existing PartialEq / Eq / Default / Copy derives preserved - cargo build + cargo test (38 passed) green
10 lines
224 B
Rust
10 lines
224 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
|
|
pub struct SubModule {
|
|
pub name: String,
|
|
pub path: String,
|
|
pub url: String,
|
|
pub branch: String,
|
|
}
|