//! # CLASS lens
//!
//! Reading and editing the `CLASS` property in place: it decodes as an
//! [`IcalText`] and edits through the generic [`IcalValueCursor`].
//!
//! Its RFC contract sits on the marker, [`CLASS`].
use crate::{
prop::class::CLASS,
tree::{line::IcalLine, prop::lens::IcalPropLens, value::cursor::IcalValueCursor},
value::text::IcalText,
};
impl IcalPropLens for CLASS {
type Target<'v> = IcalText<'v>;
type Cursor<'c, 'a>
= IcalValueCursor<'c, 'a>
where
'a: 'c;
fn cursor<'c, 'a>(line: &'c mut IcalLine<'a>) -> IcalValueCursor<'c, 'a> {
IcalValueCursor { line }
}
}