//! # PERCENT-COMPLETE lens
//!
//! Reading and editing the `PERCENT-COMPLETE` property in place: it decodes as
//! an [`IcalInteger`] and edits through the generic [`IcalValueCursor`].
//!
//! Its RFC contract sits on the marker, [`PERCENT_COMPLETE`].
use crate::{
prop::percent_complete::PERCENT_COMPLETE,
tree::{line::IcalLine, prop::lens::IcalPropLens, value::cursor::IcalValueCursor},
value::integer::IcalInteger,
};
impl IcalPropLens for PERCENT_COMPLETE {
type Target<'v> = IcalInteger<'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 }
}
}