Function js::rust::define_properties [] [src]

pub unsafe fn define_properties(
    cx: *mut JSContext,
    obj: HandleObject,
    properties: &'static [JSPropertySpec]
) -> Result<(), ()>

Defines attributes on obj. The last entry of properties must contain zeroed memory.

Failures

Returns Err on JSAPI failure.

Panics

Panics if the last entry of properties does not contain zeroed memory.

Safety