Struct tramex_tools::interface::onelog::OneLog
source · pub struct OneLog {
pub data: Vec<String>,
pub timestamp: u64,
pub layer: Layer,
pub src: SourceLog,
pub idx: u64,
pub dir: Option<String>,
}
Expand description
Data structure to store the log.
Fields§
§data: Vec<String>
Each item is a string representing a line of log.
timestamp: u64
Milliseconds since January 1st 1970.
layer: Layer
log layer
src: SourceLog
Source of the log.
idx: u64
index
dir: Option<String>
index
Implementations§
source§impl OneLog
impl OneLog
sourcepub fn extract_hexe(&self) -> Result<Vec<u8>, TramexError>
pub fn extract_hexe(&self) -> Result<Vec<u8>, TramexError>
Extract the hexadecimal representation of the log.
Errors
Returns a TramexError if the hexe representation could not be extracted.
sourcepub fn extract_canal_msg(&self) -> Option<String>
pub fn extract_canal_msg(&self) -> Option<String>
Extract the canal message of the log.
sourcepub fn extract_data(&self) -> Result<Trace, TramexError>
pub fn extract_data(&self) -> Result<Trace, TramexError>
Trait Implementations§
source§impl<'de> Deserialize<'de> for OneLog
impl<'de> Deserialize<'de> for OneLog
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for OneLog
impl Send for OneLog
impl Sync for OneLog
impl Unpin for OneLog
impl UnwindSafe for OneLog
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