/// # Safety /// /// |s| must be null, or a pointer to a valid, nul-terminated, array of chars. pubunsafefn rust_write_formatted_msg(s: *const c_char) { if s.is_null() { // Do nothing if the pointer is null. return;
} iflet Ok(guard) = LOG_CALLBACK.read() { iflet Some(f) = *guard {
f(CStr::from_ptr(s));
} // Do nothing if there is no callback.
} // Silently fail if lock cannot be acquired.
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.