pub fn new(
        number_of_subscriptions: usize,
        number_of_guard_conditions: usize,
        number_of_timers: usize,
        number_of_clients: usize,
        number_of_services: usize,
        number_of_events: usize,
        context: &mut rcl_context_t,
    ) -> Result<Self, WaitSetErrorResponse> {
        let mut waitset = Self {
            wait_set: unsafe { rcl_get_zero_initialized_wait_set() },
            initialized: false,
        };
        unsafe {
            match to_rcl_result(rcl_wait_set_init(
                waitset.wait_set.borrow_mut() as *mut _,
                number_of_subscriptions,
                number_of_guard_conditions,
                number_of_timers,
                number_of_clients,
                number_of_services,
                number_of_events,
                context,
                rcutils_get_default_allocator(),
            )) {
                Ok(()) => {
                    waitset.initialized = true;
                    Ok(waitset)
                }
                Err(err) => {
                    waitset.initialized = false;
                    Err(WaitSetErrorResponse::ReturnCode(err))
                }
            }
        }
    }
/// Creates and initializes a new WaitSet object.
///
/// Under the hood, this calls `rcl_get_zero_initialized_wait_set()`, and stores it
/// within the WaitSet struct, while also noting that the returned value is uninitialized.
Creates and initializes a new WaitSet object.
Under the hood, this calls `rcl_get_zero_initialized_wait_set()`, and stores it
within the WaitSet struct, while also noting that the returned value is uninitialized.
Creates and initializes a new WaitSet object . Under the hood this calls ` rcl_get_zero_initialized_wait_set () ` and stores it within the WaitSet struct while also noting that the returned value is uninitialized .
pub fn new(
        number_of_subscriptions: usize,
        number_of_guard_conditions: usize,
        number_of_timers: usize,
        number_of_clients: usize,
        number_of_services: usize,
        number_of_events: usize,
        context: &mut rcl_context_t,
    ) -> Result<Self, WaitSetErrorResponse> {
        let mut waitset = Self {
            wait_set: unsafe { rcl_get_zero_initialized_wait_set() },
            initialized: false,
        };
        unsafe {
            match to_rcl_result(rcl_wait_set_init(
                waitset.wait_set.borrow_mut() as *mut _,
                number_of_subscriptions,
                number_of_guard_conditions,
                number_of_timers,
                number_of_clients,
                number_of_services,
                number_of_events,
                context,
                rcutils_get_default_allocator(),
            )) {
                Ok(()) => {
                    waitset.initialized = true;
                    Ok(waitset)
                }
                Err(err) => {
                    waitset.initialized = false;
                    Err(WaitSetErrorResponse::ReturnCode(err))
                }
            }
        }
    }
pub fn new ( number_of_subscriptions : usize , number_of_guard_conditions : usize , number_of_timers : usize , number_of_clients : usize , number_of_services : usize , number_of_events : usize , context : & mut rcl_context_t , ) -> Result < Self , WaitSetErrorResponse > { let mut waitset = Self { wait_set : unsafe { rcl_get_zero_initialized_wait_set ( ) } , initialized : false , } ; unsafe { match to_rcl_result ( rcl_wait_set_init ( waitset . wait_set . borrow_mut ( ) as * mut _ , number_of_subscriptions , number_of_guard_conditions , number_of_timers , number_of_clients , number_of_services , number_of_events , context , rcutils_get_default_allocator ( ) , ) ) { Ok ( ( ) ) => { waitset . initialized = true ; Ok ( waitset ) } Err ( err ) => { waitset . initialized = false ; Err ( WaitSetErrorResponse :: ReturnCode ( err ) ) } } } }
Creates and initializes a new WaitSet object.
Creates and initializes a new WaitSet object .
number_of_subscriptions
usize
number_of_guard_conditions
usize
number_of_timers
usize
number_of_clients
usize
number_of_services
usize
number_of_events
usize
context
&mut rcl_context_t
number_of_subscriptions
usize
number_of_guard_conditions
usize
number_of_timers
usize
number_of_clients
usize
number_of_services
usize
number_of_events
usize
context
&mut rcl_context_t