pub fn export_to<W: Write>(&self, writer: &mut W) -> io::Result<()> {
        write!(writer, "BEGIN:VCALENDAR\r\n")?;
        write!(writer, "PRODID:{}\r\n", &self.prodid)?;
        write!(writer, "CALSCALE:{}\r\n", &self.calscale)?;
        write!(writer, "VERSION:{}\r\n", &self.version)?;
        write!(writer, "METHOD:{}\r\n", &self.method)?;
        write!(writer, "X-WR-CALNAME:{}\r\n", &self.x_wr_calname)?;
        write!(writer, "X-WR-TIMEZONE:{}\r\n", &self.x_wr_timezone)?;
        for i in &self.events {
            write!(writer, "BEGIN:VEVENT\r\n")?;
            write!(writer, "DTSTART:{}\r\n", &i.dtsart.format("%Y%m%dT%H%M%SZ"))?;
            write!(writer, "DTEND:{}\r\n", &i.dtend.format("%Y%m%dT%H%M%SZ"))?;
            write!(
                writer,
                "DTSTAMP:{}\r\n",
                &i.dtstamp.format("%Y%m%dT%H%M%SZ")
            )?;
            write!(writer, "UID:{}\r\n", &i.uid)?;
            write!(
                writer,
                "CREATED:{}\r\n",
                &i.created.format("%Y%m%dT%H%M%SZ")
            )?;
            write!(writer, "DESCRIPTION:{}\r\n", &i.description)?;
            write!(
                writer,
                "LAST-MODIFIED:{}\r\n",
                &i.last_modified.format("%Y%m%dT%H%M%SZ")
            )?;
            write!(writer, "LOCATION:{}\r\n", &i.location)?;
            write!(writer, "SEQUENCE:{}\r\n", &i.sequence)?;
            write!(writer, "STATUS:{}\r\n", &i.status)?;
            write!(writer, "SUMMARY:{}\r\n", &i.summary)?;
            write!(writer, "TRANSP:{}\r\n", &i.transp)?;
            write!(writer, "END:VEVENT\r\n")?;
        }
        write!(writer, "END:VCALENDAR")?;
        Ok(())
    }
/// Export iCalendar to any `Write` implementer.
///
/// # iCalendar to stdout
/// ```
/// ical.export_to(&mut std::io::stdout()).expect("Could not export to stdout");
/// ```
///

Export iCalendar to any `Write` implementer.
Export iCalendar to any ` Write ` implementer .
pub fn export_to<W: Write>(&self, writer: &mut W) -> io::Result<()> {
        write!(writer, "BEGIN:VCALENDAR\r\n")?;
        write!(writer, "PRODID:{}\r\n", &self.prodid)?;
        write!(writer, "CALSCALE:{}\r\n", &self.calscale)?;
        write!(writer, "VERSION:{}\r\n", &self.version)?;
        write!(writer, "METHOD:{}\r\n", &self.method)?;
        write!(writer, "X-WR-CALNAME:{}\r\n", &self.x_wr_calname)?;
        write!(writer, "X-WR-TIMEZONE:{}\r\n", &self.x_wr_timezone)?;
        for i in &self.events {
            write!(writer, "BEGIN:VEVENT\r\n")?;
            write!(writer, "DTSTART:{}\r\n", &i.dtsart.format("%Y%m%dT%H%M%SZ"))?;
            write!(writer, "DTEND:{}\r\n", &i.dtend.format("%Y%m%dT%H%M%SZ"))?;
            write!(
                writer,
                "DTSTAMP:{}\r\n",
                &i.dtstamp.format("%Y%m%dT%H%M%SZ")
            )?;
            write!(writer, "UID:{}\r\n", &i.uid)?;
            write!(
                writer,
                "CREATED:{}\r\n",
                &i.created.format("%Y%m%dT%H%M%SZ")
            )?;
            write!(writer, "DESCRIPTION:{}\r\n", &i.description)?;
            write!(
                writer,
                "LAST-MODIFIED:{}\r\n",
                &i.last_modified.format("%Y%m%dT%H%M%SZ")
            )?;
            write!(writer, "LOCATION:{}\r\n", &i.location)?;
            write!(writer, "SEQUENCE:{}\r\n", &i.sequence)?;
            write!(writer, "STATUS:{}\r\n", &i.status)?;
            write!(writer, "SUMMARY:{}\r\n", &i.summary)?;
            write!(writer, "TRANSP:{}\r\n", &i.transp)?;
            write!(writer, "END:VEVENT\r\n")?;
        }
        write!(writer, "END:VCALENDAR")?;
        Ok(())
    }
pub fn export_to < W : Write > ( & self , writer : & mut W ) -> io :: Result < ( ) > { write ! ( writer " \r \n " ) ? ; write ! ( writer " \r \n " self prodid ) ? ; write ! ( writer " \r \n " self calscale ) ? ; write ! ( writer " \r \n " self version ) ? ; write ! ( writer " \r \n " self method ) ? ; write ! ( writer " \r \n " self x_wr_calname ) ? ; write ! ( writer " \r \n " self x_wr_timezone ) ? ; for i in & self . events { write ! ( writer " \r \n " ) ? ; write ! ( writer " \r \n " i dtsart format ( " " ) ) ? ; write ! ( writer " \r \n " i dtend format ( " " ) ) ? ; write ! ( writer " \r \n " i dtstamp format ( " " ) ) ? ; write ! ( writer " \r \n " i uid ) ? ; write ! ( writer " \r \n " i created format ( " " ) ) ? ; write ! ( writer " \r \n " i description ) ? ; write ! ( writer " \r \n " i last_modified format ( " " ) ) ? ; write ! ( writer " \r \n " i location ) ? ; write ! ( writer " \r \n " i sequence ) ? ; write ! ( writer " \r \n " i status ) ? ; write ! ( writer " \r \n " i summary ) ? ; write ! ( writer " \r \n " i transp ) ? ; write ! ( writer " \r \n " ) ? ; } write ! ( writer " " ) ? ; Ok ( ( ) ) }
Export iCalendar to any `Write` implementer.
Export iCalendar to any ` Write ` implementer .
&self
writer
&mut W
&self
writer
&mut W
icalendar to stdout

```
ical.export_to(&mut std::io::stdout()).expect("Could not export to stdout");
```
` ` ` ical . export_to ( &mut std :: io :: stdout () ) . expect ( " Could not export to stdout " ) ; ` ` `