Hyperon C
Loading...
Searching...
No Matches
Misc Interfaces

Misc. Interfaces for integration and housekeeping. More...

Classes

struct  write_t
 A handle to a Rust std::fmt::Writer to be used from C code. More...

Functions

void log_error (const char *msg)
 Logs an error through the MeTTa library's logger. Does not halt execution.
void log_warn (const char *msg)
 Logs a warning through the MeTTa library's logger.
void log_info (const char *msg)
 Logs an informative message through the MeTTa library's logger.
intptr_t write_str (struct write_t cwrite, const char *text)
 Write C string into a Rust writer.

Detailed Description

Misc. Interfaces for integration and housekeeping.

This module is the catch-all for ancillary interfaces.

Function Documentation

◆ log_error()

void log_error ( const char * msg)

Logs an error through the MeTTa library's logger. Does not halt execution.

Parameters
[in]msgA C-style string containing the message to log

◆ log_info()

void log_info ( const char * msg)

Logs an informative message through the MeTTa library's logger.

Parameters
[in]msgA C-style string containing the message to log

◆ log_warn()

void log_warn ( const char * msg)

Logs a warning through the MeTTa library's logger.

Parameters
[in]msgA C-style string containing the message to log

◆ write_str()

intptr_t write_str ( struct write_t cwrite,
const char * text )

Write C string into a Rust writer.

Parameters
[in]cwriteA handle to a Rust writer
[in]textC string in UTF-8 format to be written
Returns
0 if string is written successfully, non-zero otherwise