summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
blob: 71579d8046499d5196db94af63d82b30e2a8edb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#![warn(unused_extern_crates)]
#![allow(clippy::redundant_closure)] // disable "redundant closure" lint

#[cfg(test)]
#[macro_use]
extern crate pretty_assertions;

#[cfg(test)]
#[macro_use]
extern crate indoc;

#[macro_use]
extern crate log;
#[macro_use]
extern crate lazy_static;
use ical; // extern crate

// libical does some weird, non-threadsafe things in timezone methods, notably
// icaltime_convert_to_zone (which is also called in icaltime_as_timet_with_zone)
// see these two (independent!) bugs:
// https://github.com/libical/libical/issues/86
// https://github.com/libical/libical/commit/0ebf2d9a7183be94991c2681c6e3f009c64cf7cc
use std::sync::Mutex;
lazy_static! {
    static ref TZ_MUTEX: Mutex<i32> = Mutex::new(0);
}

pub mod component;
pub mod duration;
pub mod property;
pub mod time;
pub mod timezone;
pub mod utils;
pub mod vcalendar;
pub mod vevent;

#[cfg(test)]
pub mod testdata;

#[cfg(test)]
pub mod testutils;

pub use crate::component::IcalComponent;
pub use crate::duration::IcalDuration;
pub use crate::property::IcalProperty;
pub use crate::time::IcalTime;
pub use crate::timezone::IcalTimeZone;
pub use crate::vcalendar::IcalEventIter;
pub use crate::vcalendar::IcalVCalendar;
pub use crate::vevent::IcalVEvent;