#[derive(Clone, Debug, Default)]
pub struct AboutMetadata {
pub name: Option<String>,
pub version: Option<String>,
pub short_version: Option<String>,
pub copyright: Option<String>,
pub authors: Option<Vec<String>>,
pub comments: Option<String>,
pub website: Option<String>,
}
#[derive(Clone, Debug, Default)]
pub struct AboutMetadataBuilder {
metadata: AboutMetadata,
}
impl AboutMetadataBuilder {
pub fn new() -> Self {
Self::default()
}
pub fn name(mut self, name: Option<impl Into<String>>) -> Self {
self.metadata.name = name.map(Into::into);
self
}
pub fn version(mut self, version: Option<impl Into<String>>) -> Self {
self.metadata.version = version.map(Into::into);
self
}
pub fn short_version(mut self, short_version: Option<impl Into<String>>) -> Self {
self.metadata.short_version = short_version.map(Into::into);
self
}
pub fn copyright(mut self, copyright: Option<impl Into<String>>) -> Self {
self.metadata.copyright = copyright.map(Into::into);
self
}
pub fn authors(mut self, authors: Option<Vec<String>>) -> Self {
self.metadata.authors = authors;
self
}
pub fn comments(mut self, comments: Option<impl Into<String>>) -> Self {
self.metadata.comments = comments.map(Into::into);
self
}
pub fn website(mut self, website: Option<impl Into<String>>) -> Self {
self.metadata.website = website.map(Into::into);
self
}
pub fn build(self) -> AboutMetadata {
self.metadata
}
}