MCPcopy Create free account
hub / github.com/asg017/sqlite-loadable-rs / value_pointer

Function value_pointer

src/api.rs:163–174  ·  view source on GitHub ↗

[`sqlite3_value_pointer`](https://www.sqlite.org/bindptr.html) # Safety should this really be unsafe???

(value: &*mut sqlite3_value, c_name: &[u8])

Source from the content-addressed store, hash-verified

161/// # Safety
162/// should this really be unsafe???
163pub unsafe fn value_pointer<T>(value: &*mut sqlite3_value, c_name: &[u8]) -> Option<*mut T> {
164 let result = sqlite3ext_value_pointer(
165 value.to_owned(),
166 c_name.as_ptr().cast::<c_char>().cast_mut(),
167 );
168
169 if result.is_null() {
170 return None;
171 }
172
173 Some(result.cast::<T>())
174}
175
176/// Returns the [`sqlite3_value_int`](https://www.sqlite.org/c3ref/value_blob.html) result
177/// from the given sqlite3_value, as i32.

Callers

nothing calls this directly

Calls 1

sqlite3ext_value_pointerFunction · 0.85

Tested by

no test coverage detected