pub struct Parser<T> { /* private fields */ }
Expand description
The main parser class
// Input can be anything that implements Read, eg file or tcp stream
let sample = File::open("sample").expect("Sample file missing");
// Stream is checked at creation to ensure stream is java serialization
let mut parser = Parser::new(sample)?;
// Objects are read from stream in turn
let obj = parser.read()?;
println!("Read Object: {:?}", obj);
println!("Class name: {}", obj.value().unwrap().object_data().unwrap().class_name());
Implementations§
Auto Trait Implementations§
impl<T> Freeze for Parser<T>
impl<T> RefUnwindSafe for Parser<T>where
T: RefUnwindSafe,
impl<T> Send for Parser<T>where
T: Send,
impl<T> Sync for Parser<T>where
T: Sync,
impl<T> Unpin for Parser<T>
impl<T> UnwindSafe for Parser<T>where
T: UnwindSafe,
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