Struct MsgReader

Source
pub struct MsgReader<'c, 'p, F> { /* private fields */ }

Implementations§

Source§

impl<'c, 'p, F> MsgReader<'c, 'p, F>
where F: Read + Write + Seek,

Source

pub fn new(inner: &'c mut CompoundFile<F>, path: &'p Path) -> Self

Examples found in repository?
examples/hello.rs (line 6)
4fn main() {
5    let mut cfb = cfb::open("path/to/your.msg").unwrap();
6    let mut reader = MsgReader::new(&mut cfb, Path::new("/"));
7
8    dbg!(&reader.from());
9    dbg!(&reader.to());
10    dbg!(&reader.cc());
11    dbg!(&reader.sent_date());
12    dbg!(&reader.subject());
13    dbg!(&reader.body());
14}
Source

pub fn subject(&mut self) -> Result<String, MsgError>

Examples found in repository?
examples/hello.rs (line 12)
4fn main() {
5    let mut cfb = cfb::open("path/to/your.msg").unwrap();
6    let mut reader = MsgReader::new(&mut cfb, Path::new("/"));
7
8    dbg!(&reader.from());
9    dbg!(&reader.to());
10    dbg!(&reader.cc());
11    dbg!(&reader.sent_date());
12    dbg!(&reader.subject());
13    dbg!(&reader.body());
14}
Source

pub fn from(&mut self) -> Result<(String, String), MsgError>

Examples found in repository?
examples/hello.rs (line 8)
4fn main() {
5    let mut cfb = cfb::open("path/to/your.msg").unwrap();
6    let mut reader = MsgReader::new(&mut cfb, Path::new("/"));
7
8    dbg!(&reader.from());
9    dbg!(&reader.to());
10    dbg!(&reader.cc());
11    dbg!(&reader.sent_date());
12    dbg!(&reader.subject());
13    dbg!(&reader.body());
14}
Source

pub fn pr_transport_message_headers(&mut self) -> Result<String, MsgError>

Source

pub fn body(&mut self) -> Result<String, MsgError>

Examples found in repository?
examples/hello.rs (line 13)
4fn main() {
5    let mut cfb = cfb::open("path/to/your.msg").unwrap();
6    let mut reader = MsgReader::new(&mut cfb, Path::new("/"));
7
8    dbg!(&reader.from());
9    dbg!(&reader.to());
10    dbg!(&reader.cc());
11    dbg!(&reader.sent_date());
12    dbg!(&reader.subject());
13    dbg!(&reader.body());
14}
Source

pub fn sent_date(&mut self) -> Result<DateTime<FixedOffset>, MsgError>

Examples found in repository?
examples/hello.rs (line 11)
4fn main() {
5    let mut cfb = cfb::open("path/to/your.msg").unwrap();
6    let mut reader = MsgReader::new(&mut cfb, Path::new("/"));
7
8    dbg!(&reader.from());
9    dbg!(&reader.to());
10    dbg!(&reader.cc());
11    dbg!(&reader.sent_date());
12    dbg!(&reader.subject());
13    dbg!(&reader.body());
14}
Source

pub fn to(&mut self) -> Result<HashMap<String, String>, MsgError>

Examples found in repository?
examples/hello.rs (line 9)
4fn main() {
5    let mut cfb = cfb::open("path/to/your.msg").unwrap();
6    let mut reader = MsgReader::new(&mut cfb, Path::new("/"));
7
8    dbg!(&reader.from());
9    dbg!(&reader.to());
10    dbg!(&reader.cc());
11    dbg!(&reader.sent_date());
12    dbg!(&reader.subject());
13    dbg!(&reader.body());
14}
Source

pub fn cc(&mut self) -> Result<HashMap<String, String>, MsgError>

Examples found in repository?
examples/hello.rs (line 10)
4fn main() {
5    let mut cfb = cfb::open("path/to/your.msg").unwrap();
6    let mut reader = MsgReader::new(&mut cfb, Path::new("/"));
7
8    dbg!(&reader.from());
9    dbg!(&reader.to());
10    dbg!(&reader.cc());
11    dbg!(&reader.sent_date());
12    dbg!(&reader.subject());
13    dbg!(&reader.body());
14}
Source

pub fn bcc(&mut self) -> Result<HashMap<String, String>, MsgError>

Source

pub fn attachments(&mut self) -> Result<Vec<Attachment>, MsgError>

Source

pub fn embedded_messages(&mut self) -> Result<Vec<PathBuf>, MsgError>

Auto Trait Implementations§

§

impl<'c, 'p, F> Freeze for MsgReader<'c, 'p, F>

§

impl<'c, 'p, F> RefUnwindSafe for MsgReader<'c, 'p, F>

§

impl<'c, 'p, F> Send for MsgReader<'c, 'p, F>
where F: Send + Sync,

§

impl<'c, 'p, F> Sync for MsgReader<'c, 'p, F>
where F: Send + Sync,

§

impl<'c, 'p, F> Unpin for MsgReader<'c, 'p, F>

§

impl<'c, 'p, F> !UnwindSafe for MsgReader<'c, 'p, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.