pub unsafe fn named_value<S: AsRef<str>>(name: S) -> Option<Value> {
    let name = CString::new(name.as_ref()).expect("string contained nul byte");
    let named = caml_named_value(name.as_ptr());
    if named.is_null() {
        return None;
    }
    Some(*named)
}
/// Return a named value registered by OCaml (e.g., via `Callback.register`).
/// If no value was registered for that name, return `None`.
///
/// # Safety
///
/// OCaml runtime doesn't document thread safety for each API, we are conservative
/// to assume that APIs are not thread-safe. If any other thread interacts with
/// the OCaml runtime during the execution of this function, undefined behavior
/// will result.
///
/// # Panics
///
/// Panics if the given `name` contains a nul byte.
Return a named value registered by OCaml .
If no value was registered for that name, return `None`.
Return a named value registered by OCaml . If no value was registered for that name return ` None ` .
pub unsafe fn named_value<S: AsRef<str>>(name: S) -> Option<Value> {
    let name = CString::new(name.as_ref()).expect("string contained nul byte");
    let named = caml_named_value(name.as_ptr());
    if named.is_null() {
        return None;
    }
    Some(*named)
}
pub unsafe fn named_value < S : AsRef < str > > ( name : S ) -> Option < Value > { let name = CString :: new ( name . as_ref ( ) ) . expect ( " " ) ; let named = caml_named_value ( name . as_ptr ( ) ) ; if named . is_null ( ) { return None ; } Some ( * named ) }
Return a named value registered by OCaml (e.g., via `Callback.register`).
Return a named value registered by OCaml ( e . g . via ` Callback . register ` ) .
name
S
name
S
safety
OCaml runtime doesn't document thread safety for each API, we are conservative
to assume that APIs are not thread-safe. If any other thread interacts with
the OCaml runtime during the execution of this function, undefined behavior
will result.
OCaml runtime doesn ' t document thread safety for each API we are conservative to assume that APIs are not thread - safe . If any other thread interacts with the OCaml runtime during the execution of this function undefined behavior will result .
panics
Panics if the given `name` contains a nul byte.
Panics if the given ` name ` contains a nul byte .