Skip to main content

ical/value/
request_status.rs

1//! # Request-status value
2//!
3//! The decoded request-status value kind.
4//!
5//! Backs the `REQUEST-STATUS` property (RFC 5545 3.8.8.3): a status code, a
6//! human-readable description, and optional extra data, the three components
7//! separated on the wire by semicolons. Each is kept as its raw text, the
8//! optional extra data being an empty [`Cow`] when absent.
9
10use alloc::borrow::Cow;
11
12/// A decoded request-status value (code, description, and optional extra data),
13/// each kept as its raw text.
14#[derive(Clone, Debug, Default, PartialEq, Eq)]
15pub struct IcalRequestStatus<'a> {
16    /// The hierarchical status code (e.g. `2.0`), kept as its raw text.
17    pub code: Cow<'a, str>,
18    /// The human-readable description of the status.
19    pub description: Cow<'a, str>,
20    /// Optional extra data; an empty [`Cow`] when absent.
21    pub extra: Cow<'a, str>,
22}