rsb_initopts

Struct 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§

Source§

impl Clone for rsb_initopts

Source§

fn clone(&self) -> rsb_initopts

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for rsb_initopts

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for rsb_initopts

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

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

impl PartialEq for rsb_initopts

Source§

fn eq(&self, other: &rsb_initopts) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for rsb_initopts

Source§

impl Eq for rsb_initopts

Source§

impl StructuralPartialEq for rsb_initopts

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.