pub enum LogEnum {
Log(Log),
Warning {
date: NaiveDateTime,
msg: Vec<String>,
},
Error {
date: NaiveDateTime,
msg: Vec<String>,
},
Exception {
date: NaiveDateTime,
msg: Vec<String>,
},
Unknown(String),
}Variants§
Implementations§
Source§impl LogEnum
impl LogEnum
Sourcepub fn as_log_mut(&mut self) -> Option<&mut Log>
pub fn as_log_mut(&mut self) -> Option<&mut Log>
Optionally returns mutable references to the inner fields if this is a LogEnum::Log, otherwise None
Sourcepub fn as_log(&self) -> Option<&Log>
pub fn as_log(&self) -> Option<&Log>
Optionally returns references to the inner fields if this is a LogEnum::Log, otherwise None
Sourcepub fn into_log(self) -> Result<Log, Self>
pub fn into_log(self) -> Result<Log, Self>
Returns the inner fields if this is a LogEnum::Log, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_warning_mut(&mut self) -> Option<(&mut DateTime, &mut Vec<String>)>
pub fn as_warning_mut(&mut self) -> Option<(&mut DateTime, &mut Vec<String>)>
Optionally returns mutable references to the inner fields if this is a LogEnum::Warning, otherwise None
Sourcepub fn as_warning(&self) -> Option<(&DateTime, &Vec<String>)>
pub fn as_warning(&self) -> Option<(&DateTime, &Vec<String>)>
Optionally returns references to the inner fields if this is a LogEnum::Warning, otherwise None
Sourcepub fn into_warning(self) -> Result<(DateTime, Vec<String>), Self>
pub fn into_warning(self) -> Result<(DateTime, Vec<String>), Self>
Returns the inner fields if this is a LogEnum::Warning, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_error_mut(&mut self) -> Option<(&mut DateTime, &mut Vec<String>)>
pub fn as_error_mut(&mut self) -> Option<(&mut DateTime, &mut Vec<String>)>
Optionally returns mutable references to the inner fields if this is a LogEnum::Error, otherwise None
Sourcepub fn as_error(&self) -> Option<(&DateTime, &Vec<String>)>
pub fn as_error(&self) -> Option<(&DateTime, &Vec<String>)>
Optionally returns references to the inner fields if this is a LogEnum::Error, otherwise None
Sourcepub fn into_error(self) -> Result<(DateTime, Vec<String>), Self>
pub fn into_error(self) -> Result<(DateTime, Vec<String>), Self>
Returns the inner fields if this is a LogEnum::Error, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_exception_mut(&mut self) -> Option<(&mut DateTime, &mut Vec<String>)>
pub fn as_exception_mut(&mut self) -> Option<(&mut DateTime, &mut Vec<String>)>
Optionally returns mutable references to the inner fields if this is a LogEnum::Exception, otherwise None
Sourcepub fn as_exception(&self) -> Option<(&DateTime, &Vec<String>)>
pub fn as_exception(&self) -> Option<(&DateTime, &Vec<String>)>
Optionally returns references to the inner fields if this is a LogEnum::Exception, otherwise None
Sourcepub fn into_exception(self) -> Result<(DateTime, Vec<String>), Self>
pub fn into_exception(self) -> Result<(DateTime, Vec<String>), Self>
Returns the inner fields if this is a LogEnum::Exception, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_unknown_mut(&mut self) -> Option<&mut String>
pub fn as_unknown_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a LogEnum::Unknown, otherwise None
Sourcepub fn as_unknown(&self) -> Option<&String>
pub fn as_unknown(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a LogEnum::Unknown, otherwise None
Sourcepub fn into_unknown(self) -> Result<String, Self>
pub fn into_unknown(self) -> Result<String, Self>
Returns the inner fields if this is a LogEnum::Unknown, otherwise returns back the enum in the Err case of the result