Struct lofty::id3::v2::TagRestrictions
source · pub struct TagRestrictions {
pub size: TagSizeRestrictions,
pub text_encoding: bool,
pub text_fields_size: TextSizeRestrictions,
pub image_encoding: bool,
pub image_size: ImageSizeRestrictions,
}Expand description
Restrictions on the content of an ID3v2 tag
Fields§
§size: TagSizeRestrictionsRestriction on the size of the tag. See TagSizeRestrictions
text_encoding: boolText encoding restrictions
false - No restrictions
true - Strings are only encoded with TextEncoding::Latin1 or TextEncoding::UTF8
text_fields_size: TextSizeRestrictionsRestrictions on all text field sizes. See TextSizeRestrictions
image_encoding: boolImage encoding restrictions
false - No restrictions
true - Images can only be PNG or JPEG
image_size: ImageSizeRestrictionsRestrictions on all image sizes. See ImageSizeRestrictions
Implementations§
source§impl TagRestrictions
impl TagRestrictions
sourcepub fn from_byte(byte: u8) -> Self
pub fn from_byte(byte: u8) -> Self
Read a TagRestrictions from a byte
NOTE: See https://id3.org/id3v2.4.0-structure section 3.2, item d
sourcepub fn as_bytes(&self) -> u8
pub fn as_bytes(&self) -> u8
Convert a TagRestrictions into a u8
Trait Implementations§
source§impl Clone for TagRestrictions
impl Clone for TagRestrictions
source§fn clone(&self) -> TagRestrictions
fn clone(&self) -> TagRestrictions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for TagRestrictions
impl Debug for TagRestrictions
source§impl Default for TagRestrictions
impl Default for TagRestrictions
source§fn default() -> TagRestrictions
fn default() -> TagRestrictions
Returns the “default value” for a type. Read more
source§impl PartialEq<TagRestrictions> for TagRestrictions
impl PartialEq<TagRestrictions> for TagRestrictions
source§fn eq(&self, other: &TagRestrictions) -> bool
fn eq(&self, other: &TagRestrictions) -> bool
This method tests for
self and other values to be equal, and is used
by ==.