Function mentat_ffi::store_value_for_attribute
[−]
[src]
#[no_mangle]pub unsafe extern "C" fn store_value_for_attribute(
store: *mut Store,
entid: c_longlong,
attribute: *const c_char,
error: *mut ExternError
) -> *mut Binding
Returns a pointer to the the Binding associated with the attribute
as
:namespace/name
for the given entid
.
If there is a value for that attribute
on the entity with id entid
then the value is returned.
If there no value for that attribute
on the entity with id entid
but the attribute is value,
then a null pointer is returned.
If there is no Attribute in the Schema for the given
attribute
then a null pointer is returned and an error is stored in is returned in error
,
Safety
Callers are responsible for managing the memory for the return value.
A destructor typed_value_destroy
is provided for releasing the memory for this
pointer type.
TODO: list the types of error that can be caused by this function