[−][src]Struct lhef::Reader
Reader for the LHEF format
Implementations
impl<T: BufRead> Reader<T>
[src]
pub fn new(stream: T) -> Result<Reader<T>, Box<dyn Error>>
[src]
Create a new LHEF reader
Example
let file = std::fs::File::open("events.lhe").unwrap(); let file = std::io::BufReader::new(file); let reader = lhef::Reader::new(file).unwrap();
pub fn version(&self) -> &str
[src]
Get the LHEF version
pub fn header(&self) -> &str
[src]
Get the LHEF header
pub fn xml_header(&self) -> &Option<XmlTree>
[src]
Get the LHEF xml header
pub fn heprup(&self) -> &HEPRUP
[src]
Get the run information in HEPRUP format
pub fn hepeup(&mut self) -> Result<Option<HEPEUP>, Box<dyn Error>>
[src]
Get the next event in HEPEUP format
Example
let file = std::fs::File::open("events.lhe").unwrap(); let file = std::io::BufReader::new(file); let mut reader = lhef::Reader::new(file).unwrap(); let event = reader.hepeup().unwrap(); match event { Some(event) => println!("Found an event."), None => println!("Reached end of event file."), }
Trait Implementations
impl<T: Debug> Debug for Reader<T>
[src]
impl<T: PartialEq> PartialEq<Reader<T>> for Reader<T>
[src]
impl<T> StructuralPartialEq for Reader<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Reader<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Reader<T> where
T: Send,
T: Send,
impl<T> Sync for Reader<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Reader<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Reader<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,