pub struct ComicInfo { /* private fields */ }Expand description
ComicInfo.xml definition, version 2.0 - spec here.
Changes from v1.0 are as follows:
Breaking change: The manga field changed from YesNo to a new Manga type
Features: The following fields have been added (getters are linked):
characters, teams, locations,
scan_information, story_arc,
series_group, age_rating,
day, main_character_or_team,
review.
These fields from v1.0 remain unchanged (getters are linked):
title, series, number, count,
volume, alternate_series,
alternate_number, alternate_count,
summary, notes, year, month,
writer, penciller, inker,
colorist, letterer, cover_artist,
editor, publisher, imprint,
genre, web, page_count,
language_iso, format, black_and_white,
manga, pages, and community_rating.
Implementations§
Source§impl ComicInfo
impl ComicInfo
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new ComicInfo with default values.
This is equivalent to ComicInfo::default().
§Returns
Self- A new ComicInfo instance with default values.
§Example
use comicinfo::v2_0::ComicInfo;
let comic_info = ComicInfo::new();Sourcepub fn set_series(&mut self, series: Option<&str>) -> &mut Self
pub fn set_series(&mut self, series: Option<&str>) -> &mut Self
Sourcepub fn set_number(&mut self, number: Option<&str>) -> &mut Self
pub fn set_number(&mut self, number: Option<&str>) -> &mut Self
Sourcepub fn set_volume(&mut self, volume: Option<i32>) -> &mut Self
pub fn set_volume(&mut self, volume: Option<i32>) -> &mut Self
Sourcepub fn alternate_series(&self) -> Option<String>
pub fn alternate_series(&self) -> Option<String>
Sourcepub fn set_alternate_series(
&mut self,
alternate_series: Option<&str>,
) -> &mut Self
pub fn set_alternate_series( &mut self, alternate_series: Option<&str>, ) -> &mut Self
Sourcepub fn alternate_number(&self) -> Option<String>
pub fn alternate_number(&self) -> Option<String>
Sourcepub fn set_alternate_number(
&mut self,
alternate_number: Option<&str>,
) -> &mut Self
pub fn set_alternate_number( &mut self, alternate_number: Option<&str>, ) -> &mut Self
Sourcepub fn alternate_count(&self) -> Option<i32>
pub fn alternate_count(&self) -> Option<i32>
Sourcepub fn set_alternate_count(&mut self, alternate_count: Option<i32>) -> &mut Self
pub fn set_alternate_count(&mut self, alternate_count: Option<i32>) -> &mut Self
Sourcepub fn set_summary(&mut self, summary: Option<&str>) -> &mut Self
pub fn set_summary(&mut self, summary: Option<&str>) -> &mut Self
Sourcepub fn writer(&self) -> Option<String>
pub fn writer(&self) -> Option<String>
Get the writer field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_writer(&self, writer: &str) -> bool
pub fn has_writer(&self, writer: &str) -> bool
Checks if the ComicInfo struct has a particular writer stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
writer- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_writer(&mut self, writer: &str) -> &mut Self
pub fn add_writer(&mut self, writer: &str) -> &mut Self
Adds a writer to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_writer.
If the field is None, it will be initialized with the provided value, e.g. Some(writer)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
writer- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_writer(&mut self, writer: &str) -> &mut Self
pub fn remove_writer(&mut self, writer: &str) -> &mut Self
Removes a writer from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_writer.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
writer- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_writers<I>(&mut self, writers: I) -> &mut Self
pub fn add_many_writers<I>(&mut self, writers: I) -> &mut Self
Sourcepub fn remove_many_writers<I>(&mut self, writers: I) -> &mut Self
pub fn remove_many_writers<I>(&mut self, writers: I) -> &mut Self
Sourcepub fn replace_writers<I>(&mut self, writers: I) -> &mut Self
pub fn replace_writers<I>(&mut self, writers: I) -> &mut Self
Replaces all existing writer values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_writer.
§Arguments
writers- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn penciller(&self) -> Option<String>
pub fn penciller(&self) -> Option<String>
Get the penciller field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_penciller(&self, penciller: &str) -> bool
pub fn has_penciller(&self, penciller: &str) -> bool
Checks if the ComicInfo struct has a particular penciller stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
penciller- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_penciller(&mut self, penciller: &str) -> &mut Self
pub fn add_penciller(&mut self, penciller: &str) -> &mut Self
Adds a penciller to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_penciller.
If the field is None, it will be initialized with the provided value, e.g. Some(penciller)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
penciller- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_penciller(&mut self, penciller: &str) -> &mut Self
pub fn remove_penciller(&mut self, penciller: &str) -> &mut Self
Removes a penciller from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_penciller.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
penciller- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_pencillers<I>(&mut self, pencillers: I) -> &mut Self
pub fn add_many_pencillers<I>(&mut self, pencillers: I) -> &mut Self
Sourcepub fn remove_many_pencillers<I>(&mut self, pencillers: I) -> &mut Self
pub fn remove_many_pencillers<I>(&mut self, pencillers: I) -> &mut Self
Sourcepub fn replace_pencillers<I>(&mut self, pencillers: I) -> &mut Self
pub fn replace_pencillers<I>(&mut self, pencillers: I) -> &mut Self
Replaces all existing penciller values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_penciller.
§Arguments
pencillers- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn inker(&self) -> Option<String>
pub fn inker(&self) -> Option<String>
Get the inker field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_inker(&self, inker: &str) -> bool
pub fn has_inker(&self, inker: &str) -> bool
Checks if the ComicInfo struct has a particular inker stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
inker- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_inker(&mut self, inker: &str) -> &mut Self
pub fn add_inker(&mut self, inker: &str) -> &mut Self
Adds a inker to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_inker.
If the field is None, it will be initialized with the provided value, e.g. Some(inker)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
inker- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_inker(&mut self, inker: &str) -> &mut Self
pub fn remove_inker(&mut self, inker: &str) -> &mut Self
Removes a inker from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_inker.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
inker- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_inkers<I>(&mut self, inkers: I) -> &mut Self
pub fn add_many_inkers<I>(&mut self, inkers: I) -> &mut Self
Sourcepub fn remove_many_inkers<I>(&mut self, inkers: I) -> &mut Self
pub fn remove_many_inkers<I>(&mut self, inkers: I) -> &mut Self
Sourcepub fn replace_inkers<I>(&mut self, inkers: I) -> &mut Self
pub fn replace_inkers<I>(&mut self, inkers: I) -> &mut Self
Replaces all existing inker values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_inker.
§Arguments
inkers- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn colorist(&self) -> Option<String>
pub fn colorist(&self) -> Option<String>
Get the colorist field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_colorist(&self, colorist: &str) -> bool
pub fn has_colorist(&self, colorist: &str) -> bool
Checks if the ComicInfo struct has a particular colorist stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
colorist- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_colorist(&mut self, colorist: &str) -> &mut Self
pub fn add_colorist(&mut self, colorist: &str) -> &mut Self
Adds a colorist to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_colorist.
If the field is None, it will be initialized with the provided value, e.g. Some(colorist)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
colorist- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_colorist(&mut self, colorist: &str) -> &mut Self
pub fn remove_colorist(&mut self, colorist: &str) -> &mut Self
Removes a colorist from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_colorist.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
colorist- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_colorists<I>(&mut self, colorists: I) -> &mut Self
pub fn add_many_colorists<I>(&mut self, colorists: I) -> &mut Self
Sourcepub fn remove_many_colorists<I>(&mut self, colorists: I) -> &mut Self
pub fn remove_many_colorists<I>(&mut self, colorists: I) -> &mut Self
Sourcepub fn replace_colorists<I>(&mut self, colorists: I) -> &mut Self
pub fn replace_colorists<I>(&mut self, colorists: I) -> &mut Self
Replaces all existing colorist values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_colorist.
§Arguments
colorists- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn letterer(&self) -> Option<String>
pub fn letterer(&self) -> Option<String>
Get the letterer field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_letterer(&self, letterer: &str) -> bool
pub fn has_letterer(&self, letterer: &str) -> bool
Checks if the ComicInfo struct has a particular letterer stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
letterer- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_letterer(&mut self, letterer: &str) -> &mut Self
pub fn add_letterer(&mut self, letterer: &str) -> &mut Self
Adds a letterer to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_letterer.
If the field is None, it will be initialized with the provided value, e.g. Some(letterer)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
letterer- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_letterer(&mut self, letterer: &str) -> &mut Self
pub fn remove_letterer(&mut self, letterer: &str) -> &mut Self
Removes a letterer from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_letterer.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
letterer- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_letterers<I>(&mut self, letterers: I) -> &mut Self
pub fn add_many_letterers<I>(&mut self, letterers: I) -> &mut Self
Sourcepub fn remove_many_letterers<I>(&mut self, letterers: I) -> &mut Self
pub fn remove_many_letterers<I>(&mut self, letterers: I) -> &mut Self
Sourcepub fn replace_letterers<I>(&mut self, letterers: I) -> &mut Self
pub fn replace_letterers<I>(&mut self, letterers: I) -> &mut Self
Replaces all existing letterer values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_letterer.
§Arguments
letterers- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn cover_artist(&self) -> Option<String>
pub fn cover_artist(&self) -> Option<String>
Get the cover_artist field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_cover_artist(&self, cover_artist: &str) -> bool
pub fn has_cover_artist(&self, cover_artist: &str) -> bool
Checks if the ComicInfo struct has a particular cover_artist stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
cover_artist- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_cover_artist(&mut self, cover_artist: &str) -> &mut Self
pub fn add_cover_artist(&mut self, cover_artist: &str) -> &mut Self
Adds a cover_artist to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_cover_artist.
If the field is None, it will be initialized with the provided value, e.g. Some(cover_artist)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
cover_artist- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_cover_artist(&mut self, cover_artist: &str) -> &mut Self
pub fn remove_cover_artist(&mut self, cover_artist: &str) -> &mut Self
Removes a cover_artist from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_cover_artist.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
cover_artist- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_cover_artists<I>(&mut self, cover_artists: I) -> &mut Self
pub fn add_many_cover_artists<I>(&mut self, cover_artists: I) -> &mut Self
Sourcepub fn remove_many_cover_artists<I>(&mut self, cover_artists: I) -> &mut Self
pub fn remove_many_cover_artists<I>(&mut self, cover_artists: I) -> &mut Self
Sourcepub fn replace_cover_artists<I>(&mut self, cover_artists: I) -> &mut Self
pub fn replace_cover_artists<I>(&mut self, cover_artists: I) -> &mut Self
Replaces all existing cover_artist values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_cover_artist.
§Arguments
cover_artists- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn editor(&self) -> Option<String>
pub fn editor(&self) -> Option<String>
Get the editor field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_editor(&self, editor: &str) -> bool
pub fn has_editor(&self, editor: &str) -> bool
Checks if the ComicInfo struct has a particular editor stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
editor- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_editor(&mut self, editor: &str) -> &mut Self
pub fn add_editor(&mut self, editor: &str) -> &mut Self
Adds a editor to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_editor.
If the field is None, it will be initialized with the provided value, e.g. Some(editor)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
editor- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_editor(&mut self, editor: &str) -> &mut Self
pub fn remove_editor(&mut self, editor: &str) -> &mut Self
Removes a editor from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_editor.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
editor- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_editors<I>(&mut self, editors: I) -> &mut Self
pub fn add_many_editors<I>(&mut self, editors: I) -> &mut Self
Sourcepub fn remove_many_editors<I>(&mut self, editors: I) -> &mut Self
pub fn remove_many_editors<I>(&mut self, editors: I) -> &mut Self
Sourcepub fn replace_editors<I>(&mut self, editors: I) -> &mut Self
pub fn replace_editors<I>(&mut self, editors: I) -> &mut Self
Replaces all existing editor values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_editor.
§Arguments
editors- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn set_publisher(&mut self, publisher: Option<&str>) -> &mut Self
pub fn set_publisher(&mut self, publisher: Option<&str>) -> &mut Self
Sourcepub fn set_imprint(&mut self, imprint: Option<&str>) -> &mut Self
pub fn set_imprint(&mut self, imprint: Option<&str>) -> &mut Self
Sourcepub fn genre(&self) -> Option<String>
pub fn genre(&self) -> Option<String>
Get the genre field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_genre(&self, genre: &str) -> bool
pub fn has_genre(&self, genre: &str) -> bool
Checks if the ComicInfo struct has a particular genre stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
genre- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_genre(&mut self, genre: &str) -> &mut Self
pub fn add_genre(&mut self, genre: &str) -> &mut Self
Adds a genre to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_genre.
If the field is None, it will be initialized with the provided value, e.g. Some(genre)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
genre- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_genre(&mut self, genre: &str) -> &mut Self
pub fn remove_genre(&mut self, genre: &str) -> &mut Self
Removes a genre from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_genre.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
genre- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_genres<I>(&mut self, genres: I) -> &mut Self
pub fn add_many_genres<I>(&mut self, genres: I) -> &mut Self
Sourcepub fn remove_many_genres<I>(&mut self, genres: I) -> &mut Self
pub fn remove_many_genres<I>(&mut self, genres: I) -> &mut Self
Sourcepub fn replace_genres<I>(&mut self, genres: I) -> &mut Self
pub fn replace_genres<I>(&mut self, genres: I) -> &mut Self
Replaces all existing genre values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_genre.
§Arguments
genres- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn web(&self) -> Option<String>
pub fn web(&self) -> Option<String>
Get the web field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_web(&self, web: &str) -> bool
pub fn has_web(&self, web: &str) -> bool
Checks if the ComicInfo struct has a particular web stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
web- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_web(&mut self, web: &str) -> &mut Self
pub fn add_web(&mut self, web: &str) -> &mut Self
Adds a web to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_web.
If the field is None, it will be initialized with the provided value, e.g. Some(web)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
web- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_web(&mut self, web: &str) -> &mut Self
pub fn remove_web(&mut self, web: &str) -> &mut Self
Removes a web from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_web.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
web- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_webs<I>(&mut self, webs: I) -> &mut Self
pub fn add_many_webs<I>(&mut self, webs: I) -> &mut Self
Sourcepub fn remove_many_webs<I>(&mut self, webs: I) -> &mut Self
pub fn remove_many_webs<I>(&mut self, webs: I) -> &mut Self
Sourcepub fn replace_webs<I>(&mut self, webs: I) -> &mut Self
pub fn replace_webs<I>(&mut self, webs: I) -> &mut Self
Replaces all existing web values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_web.
§Arguments
webs- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn page_count(&self) -> Option<i32>
pub fn page_count(&self) -> Option<i32>
Sourcepub fn set_page_count(&mut self, page_count: Option<i32>) -> &mut Self
pub fn set_page_count(&mut self, page_count: Option<i32>) -> &mut Self
Sourcepub fn language_iso(&self) -> Option<String>
pub fn language_iso(&self) -> Option<String>
Sourcepub fn set_language_iso(&mut self, language_iso: Option<&str>) -> &mut Self
pub fn set_language_iso(&mut self, language_iso: Option<&str>) -> &mut Self
Sourcepub fn set_format(&mut self, format: Option<&str>) -> &mut Self
pub fn set_format(&mut self, format: Option<&str>) -> &mut Self
Sourcepub fn black_and_white(&self) -> Option<YesNo>
pub fn black_and_white(&self) -> Option<YesNo>
Sourcepub fn set_black_and_white(
&mut self,
black_and_white: Option<YesNo>,
) -> &mut Self
pub fn set_black_and_white( &mut self, black_and_white: Option<YesNo>, ) -> &mut Self
Sourcepub fn characters(&self) -> Option<String>
pub fn characters(&self) -> Option<String>
Get the characters field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_characters(&self, characters: &str) -> bool
pub fn has_characters(&self, characters: &str) -> bool
Checks if the ComicInfo struct has a particular characters stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
characters- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_characters(&mut self, characters: &str) -> &mut Self
pub fn add_characters(&mut self, characters: &str) -> &mut Self
Adds a characters to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_characters.
If the field is None, it will be initialized with the provided value, e.g. Some(characters)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
characters- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_characters(&mut self, characters: &str) -> &mut Self
pub fn remove_characters(&mut self, characters: &str) -> &mut Self
Removes a characters from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_characters.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
characters- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_characterss<I>(&mut self, characterss: I) -> &mut Self
pub fn add_many_characterss<I>(&mut self, characterss: I) -> &mut Self
Sourcepub fn remove_many_characterss<I>(&mut self, characterss: I) -> &mut Self
pub fn remove_many_characterss<I>(&mut self, characterss: I) -> &mut Self
Sourcepub fn replace_characterss<I>(&mut self, characterss: I) -> &mut Self
pub fn replace_characterss<I>(&mut self, characterss: I) -> &mut Self
Replaces all existing characters values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_characters.
§Arguments
characterss- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn teams(&self) -> Option<String>
pub fn teams(&self) -> Option<String>
Get the teams field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_teams(&self, teams: &str) -> bool
pub fn has_teams(&self, teams: &str) -> bool
Checks if the ComicInfo struct has a particular teams stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
teams- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_teams(&mut self, teams: &str) -> &mut Self
pub fn add_teams(&mut self, teams: &str) -> &mut Self
Adds a teams to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_teams.
If the field is None, it will be initialized with the provided value, e.g. Some(teams)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
teams- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_teams(&mut self, teams: &str) -> &mut Self
pub fn remove_teams(&mut self, teams: &str) -> &mut Self
Removes a teams from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_teams.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
teams- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_teamss<I>(&mut self, teamss: I) -> &mut Self
pub fn add_many_teamss<I>(&mut self, teamss: I) -> &mut Self
Sourcepub fn remove_many_teamss<I>(&mut self, teamss: I) -> &mut Self
pub fn remove_many_teamss<I>(&mut self, teamss: I) -> &mut Self
Sourcepub fn replace_teamss<I>(&mut self, teamss: I) -> &mut Self
pub fn replace_teamss<I>(&mut self, teamss: I) -> &mut Self
Replaces all existing teams values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_teams.
§Arguments
teamss- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn locations(&self) -> Option<String>
pub fn locations(&self) -> Option<String>
Get the locations field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_locations(&self, locations: &str) -> bool
pub fn has_locations(&self, locations: &str) -> bool
Checks if the ComicInfo struct has a particular locations stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
locations- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_locations(&mut self, locations: &str) -> &mut Self
pub fn add_locations(&mut self, locations: &str) -> &mut Self
Adds a locations to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_locations.
If the field is None, it will be initialized with the provided value, e.g. Some(locations)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
locations- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_locations(&mut self, locations: &str) -> &mut Self
pub fn remove_locations(&mut self, locations: &str) -> &mut Self
Removes a locations from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_locations.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
locations- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_locationss<I>(&mut self, locationss: I) -> &mut Self
pub fn add_many_locationss<I>(&mut self, locationss: I) -> &mut Self
Sourcepub fn remove_many_locationss<I>(&mut self, locationss: I) -> &mut Self
pub fn remove_many_locationss<I>(&mut self, locationss: I) -> &mut Self
Sourcepub fn replace_locationss<I>(&mut self, locationss: I) -> &mut Self
pub fn replace_locationss<I>(&mut self, locationss: I) -> &mut Self
Replaces all existing locations values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_locations.
§Arguments
locationss- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn scan_information(&self) -> Option<String>
pub fn scan_information(&self) -> Option<String>
Sourcepub fn set_scan_information(
&mut self,
scan_information: Option<&str>,
) -> &mut Self
pub fn set_scan_information( &mut self, scan_information: Option<&str>, ) -> &mut Self
Sourcepub fn story_arc(&self) -> Option<String>
pub fn story_arc(&self) -> Option<String>
Get the story_arc field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_story_arc(&self, story_arc: &str) -> bool
pub fn has_story_arc(&self, story_arc: &str) -> bool
Checks if the ComicInfo struct has a particular story_arc stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
story_arc- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_story_arc(&mut self, story_arc: &str) -> &mut Self
pub fn add_story_arc(&mut self, story_arc: &str) -> &mut Self
Adds a story_arc to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_story_arc.
If the field is None, it will be initialized with the provided value, e.g. Some(story_arc)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
story_arc- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_story_arc(&mut self, story_arc: &str) -> &mut Self
pub fn remove_story_arc(&mut self, story_arc: &str) -> &mut Self
Removes a story_arc from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_story_arc.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
story_arc- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_story_arcs<I>(&mut self, story_arcs: I) -> &mut Self
pub fn add_many_story_arcs<I>(&mut self, story_arcs: I) -> &mut Self
Sourcepub fn remove_many_story_arcs<I>(&mut self, story_arcs: I) -> &mut Self
pub fn remove_many_story_arcs<I>(&mut self, story_arcs: I) -> &mut Self
Sourcepub fn replace_story_arcs<I>(&mut self, story_arcs: I) -> &mut Self
pub fn replace_story_arcs<I>(&mut self, story_arcs: I) -> &mut Self
Replaces all existing story_arc values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_story_arc.
§Arguments
story_arcs- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn series_group(&self) -> Option<String>
pub fn series_group(&self) -> Option<String>
Get the series_group field as Option<String>.
§Returns
Option<String>- A string representation of the field.
Sourcepub fn has_series_group(&self, series_group: &str) -> bool
pub fn has_series_group(&self, series_group: &str) -> bool
Checks if the ComicInfo struct has a particular series_group stored in its associated field.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
series_group- The value to check for.
§Returns
bool-trueif the value exists in the field,falseotherwise.
Sourcepub fn add_series_group(&mut self, series_group: &str) -> &mut Self
pub fn add_series_group(&mut self, series_group: &str) -> &mut Self
Adds a series_group to the associated field.
If it already exists, then this function is a no-op. Existence is checked using Self::has_series_group.
If the field is None, it will be initialized with the provided value, e.g. Some(series_group)
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
series_group- The value to add.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn remove_series_group(&mut self, series_group: &str) -> &mut Self
pub fn remove_series_group(&mut self, series_group: &str) -> &mut Self
Removes a series_group from the associated field.
If it indeed exists, then it is removed. Existence is checked using Self::has_series_group.
If it doesn’t exist, then this function is a no-op.
Should a removal result in an empty string, then we set the field to None.
If the value needs to be percent-encoded (i.e. spaces replaced with %20), this is done automatically for you.
§Arguments
series_group- The value to remove.
§Returns
Self- The updated struct with the value added if not already present.
Sourcepub fn add_many_series_groups<I>(&mut self, series_groups: I) -> &mut Self
pub fn add_many_series_groups<I>(&mut self, series_groups: I) -> &mut Self
Sourcepub fn remove_many_series_groups<I>(&mut self, series_groups: I) -> &mut Self
pub fn remove_many_series_groups<I>(&mut self, series_groups: I) -> &mut Self
Sourcepub fn replace_series_groups<I>(&mut self, series_groups: I) -> &mut Self
pub fn replace_series_groups<I>(&mut self, series_groups: I) -> &mut Self
Replaces all existing series_group values in the associated field with the provided set of values.
This method clears the existing field (sets it to None) and then adds each value from the provided HashSet using Self::add_series_group.
§Arguments
series_groups- Any iterator over the values to set the field to.
§Returns
Self- The updated struct with the field replaced by the new values.
Sourcepub fn age_rating(&self) -> Option<AgeRating>
pub fn age_rating(&self) -> Option<AgeRating>
Sourcepub fn set_age_rating(&mut self, age_rating: Option<AgeRating>) -> &mut Self
pub fn set_age_rating(&mut self, age_rating: Option<AgeRating>) -> &mut Self
Sourcepub fn pages(&self) -> Option<ArrayOfComicPageInfo>
pub fn pages(&self) -> Option<ArrayOfComicPageInfo>
Sourcepub fn set_pages(&mut self, pages: Option<ArrayOfComicPageInfo>) -> &mut Self
pub fn set_pages(&mut self, pages: Option<ArrayOfComicPageInfo>) -> &mut Self
Sourcepub fn community_rating(&self) -> Option<f32>
pub fn community_rating(&self) -> Option<f32>
Sourcepub fn set_community_rating(
&mut self,
community_rating: Option<f32>,
) -> &mut Self
pub fn set_community_rating( &mut self, community_rating: Option<f32>, ) -> &mut Self
Sourcepub fn main_character_or_team(&self) -> Option<String>
pub fn main_character_or_team(&self) -> Option<String>
Sourcepub fn set_main_character_or_team(
&mut self,
main_character_or_team: Option<&str>,
) -> &mut Self
pub fn set_main_character_or_team( &mut self, main_character_or_team: Option<&str>, ) -> &mut Self
Trait Implementations§
Source§impl Default for ComicInfo
impl Default for ComicInfo
Source§fn default() -> Self
fn default() -> Self
Create a default ComicInfo with following reasonable defaults:
- String (
xs:string) fields default toNoneifdefault="", otherwiseSome(..) - Integer (
xs:int) fields default toNoneifdefault=-1, otherwiseSome(..) - Custom types default to their specified default
§Returns
Self- A ComicInfo instance with default values.
§Example
use comicinfo::v1_0::ComicInfo;
let comic_info = ComicInfo::default();Source§impl<'de> Deserialize<'de> for ComicInfo
impl<'de> Deserialize<'de> for ComicInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromStr for ComicInfo
impl FromStr for ComicInfo
Source§fn from_str(xml: &str) -> Result<Self, Error>
fn from_str(xml: &str) -> Result<Self, Error>
Deserialize ComicInfo from an XML string using serde_xml_rs.
§Arguments
xml- A string slice containing the XML data.
§Returns
Result<Self, serde_xml_rs::Error>- The deserialized ComicInfo or an error.
§Example
use comicinfo::ComicInfo;
use std::str::FromStr;
let xml = r#"<ComicInfo>...</ComicInfo>"#;
if let Ok(comic_info) = ComicInfo::from_str(xml) {
// use comic_info
}