Trait ToLvError

Source
pub trait ToLvError {
    // Required method
    fn description(&self) -> Cow<'_, str>;

    // Provided methods
    fn code(&self) -> LVStatusCode { ... }
    fn is_error(&self) -> bool { ... }
    fn source(&self) -> Cow<'_, str> { ... }
    fn write_error(&self, error_cluster: &mut ErrorClusterPtr<'_>) -> Result<()> { ... }
}
Expand description

A trait that can be implemented on types to allow them to be written into a error cluster with ToLvError::write_error.

Required Methods§

Source

fn description(&self) -> Cow<'_, str>

The description of the error;

Provided Methods§

Source

fn code(&self) -> LVStatusCode

The code for the error. Default is 42.

Source

fn is_error(&self) -> bool

True if is error. Default is true.

Source

fn source(&self) -> Cow<'_, str>

The source of the error if available. Default: none.

Source

fn write_error(&self, error_cluster: &mut ErrorClusterPtr<'_>) -> Result<()>

Write into the LabVIEW Error Pointer.

The pointer is the type that is recieved through the Call Library Node so there is no need to deal with references before this point.

This requires the link feature to enable string manipulation.

Implementors§