pub enum BorderColor {
Rgb(Color),
Rgba([f64; 4]),
}Expand description
A texture’s borderColor, whose schema is the one place a CityJSON colour
is not fixed at three numbers:
"borderColor": {
"type": "array", "items": {"type": "number"},
"minItems": 3, "maxItems": 4
}Three or four, and nothing else. A Vec<f64> would accept two or five and
leave the check to a consumer that may not make it; the untagged pair of
fixed-size arrays makes serde do it. Serialization is derived, and an
untagged enum of arrays serializes as the array itself, so [0, 0, 0, 1]
comes back spelled exactly as it went in.
Variants§
Trait Implementations§
Source§impl Clone for BorderColor
impl Clone for BorderColor
Source§fn clone(&self) -> BorderColor
fn clone(&self) -> BorderColor
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 moreSource§impl Debug for BorderColor
impl Debug for BorderColor
Source§impl<'de> Deserialize<'de> for BorderColor
impl<'de> Deserialize<'de> for BorderColor
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
Source§impl PartialEq for BorderColor
impl PartialEq for BorderColor
Source§impl Serialize for BorderColor
impl Serialize for BorderColor
impl StructuralPartialEq for BorderColor
Auto Trait Implementations§
impl Freeze for BorderColor
impl RefUnwindSafe for BorderColor
impl Send for BorderColor
impl Sync for BorderColor
impl Unpin for BorderColor
impl UnsafeUnpin for BorderColor
impl UnwindSafe for BorderColor
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