#[repr(C)]
pub struct rsb_initopts { pub keys: *mut rsb_opt_t, pub values: *mut *mut c_void, pub n_pairs: rsb_int_t, pub action: rsb_int_t, }
Expand description

@brief A structure specifying library (initialization) options, to be used with the \ref rsb_lib_reinit() function. \n

The structure specifies, for \c i=0,..,n_pairs-1 , a list of (key,value) pairs, stored respectively as (\c keys[i],values[i]). \n Each flag specifies the type and possible range of values it accepts. \n The structure may he used to set or query various library parameters.

Example: \code const int max_io=10; // the number of different options we want to set struct rsb_initopts io={NULL,NULL,0,RSB_IO_SPECIFIER_SET}, iop=&io; // pointer to the options structure void * io_values[max_io]; // an array of pointers to max_io different option values (we shall set) enum rsb_opt_t io_keys[max_io]; // an array of max_io flag values specifying the type of values we are handing over to the library io.keys=io_keys; // io.keys will now point to io_keys as its keys array io.values=io_values; // io.values will now point to io_keys as its values array io.n_pairs=0; // we have 0 pairs specified so far io.keys[io.n_pairs]=RSB_IO_WANT_BOUNDED_BOX_COMPUTATION; // the first (at index 0) option we want to specify is RSB_IO_WANT_BOUNDED_BOX_COMPUTATION io.values[io.n_pairs]=1; // the value we want to set the RSB_IO_WANT_BOUNDED_BOX_COMPUTATION option to io.n_pairs++; // io.n_pairs is set to 1: we have one option set, so even if we have (max_io-io.n_pairs) left, only the first will be read … // we are free to specify other option (type, value) pairs \endcode

Fields

keys: *mut rsb_opt_t

An array of value types key flags.

values: *mut *mut c_void

An array of value pointers, as specified by each flag value.

n_pairs: rsb_int_t

The length of the \c keys and \c values arrays.

action: rsb_int_t

The action we are requesting (either one of #RSB_IO_SPECIFIER_GET or #RSB_IO_SPECIFIER_SET)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.