Enum repng::meta::Keyword
[−]
[src]
pub enum Keyword<'a> { Title, Author, Description, Copyright, CreationTime, Software, Disclaimer, Warning, Source, Comment, Other(&'a str), }
A metadata category.
Variants
Title
Short (one line) title or caption for image.
Author
Name of image's creator.
Description
Description of image (possibly long).
Copyright
Copyright notice.
CreationTime
Time of original image creation.
Software
Software used to create the image.
Disclaimer
Legal disclaimer.
Warning
Warning of nature of content.
Source
Device used to create the image.
Comment
Miscellaneous comment.
Other(&'a str)
A custom keyword between 1 and 79 characters in length.
Methods
impl<'a> Keyword<'a>
[src]
pub fn valid(&self) -> bool
[src]
Whether the keyword is valid.
- It must be at least 1 character long.
- It must be no more than 79 characters long.
- It must only use the characters in the ASCII range [32, 126].
- It must not contain leading or trailing spaces.
- It must not contain consecutive spaces.
pub fn as_str(&self) -> &str
[src]
Get the keyword as a string.