pub struct TzRuleFields { /* private fields */ }Expand description
Companion struct for extracting owned values from fields.
This struct contains all field values transferred from the original struct.
Use take_* methods to extract values. All fields return Option<T>,
including required fields (which should always be Some if the original
struct was valid).
This is a “reverse builder” pattern - fields can only be extracted, not inserted.
Implementations§
Source§impl TzRuleFields
impl TzRuleFields
Sourcepub fn take_kind(&mut self) -> Option<TzRuleKind>
pub fn take_kind(&mut self) -> Option<TzRuleKind>
Removes and returns the kind field value if present.
Sourcepub fn take_dtstart(&mut self) -> Option<Prop<DateTimeOrDate, Params>>
pub fn take_dtstart(&mut self) -> Option<Prop<DateTimeOrDate, Params>>
Removes and returns the dtstart field value if present.
Sourcepub fn take_tz_offset_to(&mut self) -> Option<Prop<UtcOffset, Params>>
pub fn take_tz_offset_to(&mut self) -> Option<Prop<UtcOffset, Params>>
Removes and returns the tz_offset_to field value if present.
Sourcepub fn take_tz_offset_from(&mut self) -> Option<Prop<UtcOffset, Params>>
pub fn take_tz_offset_from(&mut self) -> Option<Prop<UtcOffset, Params>>
Removes and returns the tz_offset_from field value if present.
Sourcepub fn take_comment(&mut self) -> Option<Vec<Prop<String, Params>>>
pub fn take_comment(&mut self) -> Option<Vec<Prop<String, Params>>>
Removes and returns the comment field value if present.
Sourcepub fn take_rdate(&mut self) -> Option<Vec<Prop<RDateSeq, Params>>>
pub fn take_rdate(&mut self) -> Option<Vec<Prop<RDateSeq, Params>>>
Removes and returns the rdate field value if present.
Sourcepub fn take_rrule(&mut self) -> Option<Vec<Prop<RRule, Params>>>
pub fn take_rrule(&mut self) -> Option<Vec<Prop<RRule, Params>>>
Removes and returns the rrule field value if present.
Sourcepub fn take_tz_name(&mut self) -> Option<Vec<Prop<String, Params>>>
pub fn take_tz_name(&mut self) -> Option<Vec<Prop<String, Params>>>
Removes and returns the tz_name field value if present.
Sourcepub fn take_x_property<__Q>(
&mut self,
key: &__Q,
) -> Option<Vec<Prop<Value<String>, Params>>>
pub fn take_x_property<__Q>( &mut self, key: &__Q, ) -> Option<Vec<Prop<Value<String>, Params>>>
Removes and returns the x_property value for the given key.
Sourcepub fn x_property_iter(
&self,
) -> impl Iterator<Item = (&Box<CaselessStr>, &Vec<Prop<Value<String>, Params>>)>
pub fn x_property_iter( &self, ) -> impl Iterator<Item = (&Box<CaselessStr>, &Vec<Prop<Value<String>, Params>>)>
Returns an iterator over all x_property fields.
Sourcepub fn x_property_iter_mut(
&mut self,
) -> impl Iterator<Item = (&Box<CaselessStr>, &mut Vec<Prop<Value<String>, Params>>)>
pub fn x_property_iter_mut( &mut self, ) -> impl Iterator<Item = (&Box<CaselessStr>, &mut Vec<Prop<Value<String>, Params>>)>
Returns a mutable iterator over all x_property fields.
Sourcepub fn drain_x_property(
&mut self,
) -> HashMap<Box<CaselessStr>, Vec<Prop<Value<String>, Params>>>
pub fn drain_x_property( &mut self, ) -> HashMap<Box<CaselessStr>, Vec<Prop<Value<String>, Params>>>
Drains all x_property fields into a new map.