pub struct IcalPropBuilder<'a, L: IcalPropSpec> {
pub version: IcalVersion,
pub params: Vec<IcalParam<'a>>,
/* private fields */
}Expand description
A version-aware builder for one property, keyed by its property marker.
Fields§
§version: IcalVersionThe calendar version the property is built for.
params: Vec<IcalParam<'a>>The parameters accumulated so far.
Implementations§
Source§impl<'a, L: IcalPropSpec> IcalPropBuilder<'a, L>
impl<'a, L: IcalPropSpec> IcalPropBuilder<'a, L>
Sourcepub fn new(version: IcalVersion) -> Self
pub fn new(version: IcalVersion) -> Self
Start a builder for the given calendar version.
Sourcepub fn param(self, param: IcalParam<'a>) -> Self
pub fn param(self, param: IcalParam<'a>) -> Self
Add a parameter (validated against the spec on build).
Sourcepub fn build(
self,
value: IcalValue<'a>,
) -> Result<IcalProp<'a>, Vec<IcalValidateError>>
pub fn build( self, value: IcalValue<'a>, ) -> Result<IcalProp<'a>, Vec<IcalValidateError>>
Finish with a value, emitting the property named by the spec.
Runs the same per-property check as
Ical::validate: the value kind must be
allowed and every known parameter must be allowed for the version
(unknown, i.e. extension, parameters pass).
Auto Trait Implementations§
impl<'a, L> Freeze for IcalPropBuilder<'a, L>where
PhantomData<L>: Freeze,
impl<'a, L> RefUnwindSafe for IcalPropBuilder<'a, L>where
PhantomData<L>: RefUnwindSafe,
impl<'a, L> Send for IcalPropBuilder<'a, L>where
PhantomData<L>: Send,
impl<'a, L> Sync for IcalPropBuilder<'a, L>where
PhantomData<L>: Sync,
impl<'a, L> Unpin for IcalPropBuilder<'a, L>where
PhantomData<L>: Unpin,
impl<'a, L> UnsafeUnpin for IcalPropBuilder<'a, L>where
PhantomData<L>: UnsafeUnpin,
impl<'a, L> UnwindSafe for IcalPropBuilder<'a, L>where
PhantomData<L>: UnwindSafe,
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