pub struct CalendarSection {
pub booking_endpoints: Vec<BookingEndpoint>,
pub availability_feed: Option<String>,
pub scheduling_protocol: Option<String>,
pub office_hours: Vec<ScheduleWindow>,
pub timezone: Option<String>,
}Expand description
Calendar and scheduling section of an OAS Identity Document.
§Examples
use oas_document::calendar::{CalendarSection, BookingEndpoint, ScheduleWindow};
use oas_document::visibility::Visibility;
let calendar = CalendarSection {
booking_endpoints: vec![
BookingEndpoint {
id: "booking-external".to_string(),
url: "https://cal.com/agent42/intro".to_string(),
label: Some("Intro call".to_string()),
booking_type: Some("consultation".to_string()),
visibility: Visibility::Public,
},
BookingEndpoint {
id: "booking-internal".to_string(),
url: "https://internal.acme.com/schedule/agent42".to_string(),
label: Some("Internal sync".to_string()),
booking_type: Some("meeting".to_string()),
visibility: Visibility::Organization,
},
],
availability_feed: Some("https://cal.com/agent42/availability.ics".to_string()),
scheduling_protocol: Some("ical-invite".to_string()),
office_hours: vec![
ScheduleWindow {
day: "monday".to_string(),
start: "09:00".to_string(),
end: "17:00".to_string(),
timezone: "America/New_York".to_string(),
},
],
timezone: Some("America/New_York".to_string()),
};
assert_eq!(calendar.booking_endpoints.len(), 2);Fields§
§booking_endpoints: Vec<BookingEndpoint>Booking endpoints, each with independent visibility.
availability_feed: Option<String>iCal/CalDAV URL for real-time availability (free/busy).
scheduling_protocol: Option<String>Preferred scheduling protocol:
"ical-invite", "api", "agent-negotiation", "manual".
office_hours: Vec<ScheduleWindow>Recurring office hours / availability windows.
timezone: Option<String>Default IANA timezone for this entity’s schedule.
Trait Implementations§
Source§impl Clone for CalendarSection
impl Clone for CalendarSection
Source§fn clone(&self) -> CalendarSection
fn clone(&self) -> CalendarSection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CalendarSection
impl Debug for CalendarSection
Source§impl<'de> Deserialize<'de> for CalendarSection
impl<'de> Deserialize<'de> for CalendarSection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CalendarSection
Source§impl PartialEq for CalendarSection
impl PartialEq for CalendarSection
Source§impl Serialize for CalendarSection
impl Serialize for CalendarSection
impl StructuralPartialEq for CalendarSection
Auto Trait Implementations§
impl Freeze for CalendarSection
impl RefUnwindSafe for CalendarSection
impl Send for CalendarSection
impl Sync for CalendarSection
impl Unpin for CalendarSection
impl UnsafeUnpin for CalendarSection
impl UnwindSafe for CalendarSection
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