Struct librsb_sys::rsb_initopts
source · [−]#[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
sourceimpl Clone for rsb_initopts
impl Clone for rsb_initopts
sourcefn clone(&self) -> rsb_initopts
fn clone(&self) -> rsb_initopts
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for rsb_initopts
impl Debug for rsb_initopts
sourceimpl Hash for rsb_initopts
impl Hash for rsb_initopts
sourceimpl PartialEq<rsb_initopts> for rsb_initopts
impl PartialEq<rsb_initopts> for rsb_initopts
sourcefn eq(&self, other: &rsb_initopts) -> bool
fn eq(&self, other: &rsb_initopts) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &rsb_initopts) -> bool
fn ne(&self, other: &rsb_initopts) -> bool
This method tests for !=
.
impl Copy for rsb_initopts
impl Eq for rsb_initopts
impl StructuralEq for rsb_initopts
impl StructuralPartialEq for rsb_initopts
Auto Trait Implementations
impl RefUnwindSafe for rsb_initopts
impl !Send for rsb_initopts
impl !Sync for rsb_initopts
impl Unpin for rsb_initopts
impl UnwindSafe for rsb_initopts
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more