isbnlib/jsonb/
authors_list_element.rsuse serde::{Deserialize, Serialize};
use crate::enums::author_list_element_type::AuthorListElementType;
use crate::enums::string_or_key_value_block::StringOrKeyValueBlock;
#[derive(
Serialize,
Deserialize,
Debug,
Clone,
PartialEq,
)]
pub struct AuthorsListElement {
#[serde(rename(deserialize = "type"))]
pub value_type: AuthorListElementType,
pub author: Option<StringOrKeyValueBlock>
}
impl AuthorsListElement {
pub fn to_string(self) -> String {
match self.author {
Some(author) => author.to_string(),
None => String::new()
}
}
}