pub struct NgLog {
pub events: Vec<NgEvent>,
}Expand description
A type representing an ngLog-formatted file.
Fields§
§events: Vec<NgEvent>A collection of ngLog events.
Implementations§
Source§impl NgLog
impl NgLog
Sourcepub fn new(capacity: usize) -> NgLog
pub fn new(capacity: usize) -> NgLog
Constructs a new NgLog instance, allocating memory for at least
capacity events.
Sourcepub fn local_from_reader<T>(reader: &mut T) -> IoResult<NgLog>where
T: Read,
pub fn local_from_reader<T>(reader: &mut T) -> IoResult<NgLog>where
T: Read,
Constructs a new NgLog instance using data from a type implementing
std::io::Read. The data is interpreted as a UTF-8 string.
§Failures
If the input data is either not valid UTF-8 or malformed, this method
returns an std::io::Error instance describing the error.
Sourcepub fn world_from_reader<T>(reader: &mut T) -> IoResult<NgLog>where
T: Read,
pub fn world_from_reader<T>(reader: &mut T) -> IoResult<NgLog>where
T: Read,
Constructs a new NgLog instance using data from a type implementing
std::io::Error. The data is fed through a decoding algorithm, then
interpreted as a UTF-8 string.
§Failures
If the input data is either not valid UTF-8 or malformed, this method
returns an std::io::Error instance describing the error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NgLog
impl RefUnwindSafe for NgLog
impl Send for NgLog
impl Sync for NgLog
impl Unpin for NgLog
impl UnwindSafe for NgLog
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