#[non_exhaustive]pub struct LayerAttributes {
pub effective_date: Option<DateTime<Utc>>,
pub end_date: Option<DateTime<Utc>>,
pub interval: Option<LayerAttributesInterval>,
pub name: Option<String>,
pub restrictions: Option<Vec<TimeRestriction>>,
pub rotation_start: Option<DateTime<Utc>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Describes key properties of a Layer, including rotation details, name, start/end times, and any restrictions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.effective_date: Option<DateTime<Utc>>
When the layer becomes active (ISO 8601).
end_date: Option<DateTime<Utc>>
When the layer ceases to be active (ISO 8601).
interval: Option<LayerAttributesInterval>
Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
name: Option<String>
The name of this layer.
restrictions: Option<Vec<TimeRestriction>>
An optional list of time restrictions for when this layer is in effect.
rotation_start: Option<DateTime<Utc>>
The date/time when the rotation starts (ISO 8601).
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl LayerAttributes
impl LayerAttributes
pub fn new() -> LayerAttributes
pub fn effective_date(self, value: DateTime<Utc>) -> Self
pub fn end_date(self, value: DateTime<Utc>) -> Self
pub fn interval(self, value: LayerAttributesInterval) -> Self
pub fn name(self, value: String) -> Self
pub fn restrictions(self, value: Vec<TimeRestriction>) -> Self
pub fn rotation_start(self, value: DateTime<Utc>) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for LayerAttributes
impl Clone for LayerAttributes
Source§fn clone(&self) -> LayerAttributes
fn clone(&self) -> LayerAttributes
Returns a duplicate 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 LayerAttributes
impl Debug for LayerAttributes
Source§impl Default for LayerAttributes
impl Default for LayerAttributes
Source§impl<'de> Deserialize<'de> for LayerAttributes
impl<'de> Deserialize<'de> for LayerAttributes
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 LayerAttributes
impl PartialEq for LayerAttributes
Source§impl Serialize for LayerAttributes
impl Serialize for LayerAttributes
impl StructuralPartialEq for LayerAttributes
Auto Trait Implementations§
impl Freeze for LayerAttributes
impl RefUnwindSafe for LayerAttributes
impl Send for LayerAttributes
impl Sync for LayerAttributes
impl Unpin for LayerAttributes
impl UnwindSafe for LayerAttributes
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