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
) -> *mut ExternResult
Returns an ExternResult containing 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 in ok
.
If there no value for that attribute
on the entity with id entid
but the attribute is value,
then a null pointer is returned in ok
.
If there is no Attribute in the Schema for the given attribute
then an error is returned in err
.
Safety
Callers are responsible for managing the memory for the return value.
A destructor destroy
is provided for releasing the memory for this
pointer type.
TODO: list the types of error that can be caused by this function