pub enum TextureFormat {
PNG,
JPG,
}Expand description
A texture image’s file format: "type": {"enum": ["PNG", "JPG"]}.
Note the case: this member is spelled upper case where its wrapMode and
textureType siblings are lower. Getting that wrong in a hand-written
match is precisely the defect this type removes.
A closed enumeration in the schema – unlike CityObjectType and
SemanticSurfaceType, which carry an Extension(String) case because
CityJSON Extensions may add to those two sets. Nothing in the spec lets an
Extension add a texture format, so there is no such case here and an
unrecognised spelling is an error.
Variants§
Trait Implementations§
Source§impl Clone for TextureFormat
impl Clone for TextureFormat
Source§fn clone(&self) -> TextureFormat
fn clone(&self) -> TextureFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextureFormat
Source§impl Debug for TextureFormat
impl Debug for TextureFormat
Source§impl<'de> Deserialize<'de> for TextureFormat
impl<'de> Deserialize<'de> for TextureFormat
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TextureFormat
Source§impl Hash for TextureFormat
impl Hash for TextureFormat
Source§impl PartialEq for TextureFormat
impl PartialEq for TextureFormat
Source§impl Serialize for TextureFormat
impl Serialize for TextureFormat
impl StructuralPartialEq for TextureFormat
Auto Trait Implementations§
impl Freeze for TextureFormat
impl RefUnwindSafe for TextureFormat
impl Send for TextureFormat
impl Sync for TextureFormat
impl Unpin for TextureFormat
impl UnsafeUnpin for TextureFormat
impl UnwindSafe for TextureFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more