diff --git a/src/messages/repository.rs b/src/messages/repository.rs index da80adb..fe7d5cd 100644 --- a/src/messages/repository.rs +++ b/src/messages/repository.rs @@ -188,7 +188,10 @@ pub struct RepositoryIssue { #[derive(Clone, Serialize, Deserialize)] pub struct RepositoryInfoRequest { pub repository: Repository, + /// Whether to fetch extra metadata like the last commit made to file or size pub extra_metadata: bool, + /// Rev (branch) being requested pub rev: Option, + /// Tree path being requested pub path: Option, } diff --git a/src/model/repository.rs b/src/model/repository.rs index d7e4b1f..6655aa4 100644 --- a/src/model/repository.rs +++ b/src/model/repository.rs @@ -1,3 +1,4 @@ +use std::fmt::{Display, Formatter}; use std::str::FromStr; use serde::{Deserialize, Serialize}; @@ -69,6 +70,13 @@ pub enum RepositoryVisibility { Private, } +/// Implements [`Display`] for [`RepositoryVisiblity`] using [`Debug`] +impl Display for RepositoryVisibility { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self) + } +} + #[derive(Clone, Debug, Serialize, Deserialize)] pub struct RepositoryView { /// Name of the repository