1 <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This function is an override for the C function, this is the an edited version of the original description:"><title>rustsecp256k1_v0_10_0_default_error_callback_fn in bdk_chain::bitcoin::secp256k1::ffi - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="bdk_chain" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (78a775127 2024-05-11)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><h2><a href="../../../../bdk_chain/index.html">bdk_chain</a><span class="version">0.20.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In bdk_chain::bitcoin::secp256k1::ffi</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../../index.html">bdk_chain</a>::<wbr><a href="../../index.html">bitcoin</a>::<wbr><a href="../index.html">secp256k1</a>::<wbr><a href="index.html">ffi</a>::<wbr><a class="fn" href="#">rustsecp256k1_v0_10_0_default_error_callback_fn</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub unsafe extern "C" fn rustsecp256k1_v0_10_0_default_error_callback_fn(
2 message: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>,
3 _data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="types/enum.c_void.html" title="enum bdk_chain::bitcoin::secp256k1::ffi::types::c_void">c_void</a>
4 )</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><strong>This function is an override for the C function, this is the an edited version of the original description:</strong></p>
5 <p>A callback function to be called when an internal consistency check
6 fails. <strong>This will cause a panic</strong>.</p>
7 <p>This can only trigger in case of a hardware failure, miscompilation,
8 memory corruption, serious bug in the library, or other error would can
9 otherwise result in undefined behaviour. It will not trigger due to mere
10 incorrect usage of the API (see secp256k1_default_illegal_callback_fn
11 for that). After this callback returns, anything may happen, including
13 <p>See also secp256k1_default_illegal_callback_fn.</p>
14 <h2 id="safety"><a class="doc-anchor" href="#safety">ยง</a>Safety</h2>
15 <p><code>message</code> string should be a null terminated C string and, up to the first null byte, must be valid UTF8.</p>
16 <p>For exact safety constraints see <a href="https://doc.rust-lang.org/nightly/core/slice/raw/fn.from_raw_parts.html" title="fn core::slice::raw::from_raw_parts"><code>std::slice::from_raw_parts</code></a> and <a href="https://doc.rust-lang.org/nightly/core/str/converts/fn.from_utf8_unchecked.html" title="fn core::str::converts::from_utf8_unchecked"><code>std::str::from_utf8_unchecked</code></a>.</p>
17 </div></details></section></div></main></body></html>