pub fn clear(&mut self) -> Result<(), WaitSetErrorResponse> {
        if !self.initialized {
            return Err(WaitSetErrorResponse::ReturnCode(
                RclReturnCode::WaitSetError(WaitSetErrorCode::WaitSetInvalid),
            ));
        }
        unsafe {
            // Whether or not we successfully clear, this WaitSet will count as uninitialized
            self.initialized = false;
            to_rcl_result(rcl_wait_set_clear(self.wait_set.borrow_mut() as *mut _))
                .map_err(WaitSetErrorResponse::ReturnCode)
        }
    }
/// Removes (sets to NULL) all entities in the WaitSet
///
/// # Errors
/// - `RclError::InvalidArgument` if any arguments are invalid.
/// - `RclError::WaitSetInvalid` if the WaitSet is already zero-initialized.
/// - `RclError::Error` for an unspecified error
Removes (sets to NULL) all entities in the WaitSet
Removes ( sets to NULL ) all entities in the WaitSet
pub fn clear(&mut self) -> Result<(), WaitSetErrorResponse> {
        if !self.initialized {
            return Err(WaitSetErrorResponse::ReturnCode(
                RclReturnCode::WaitSetError(WaitSetErrorCode::WaitSetInvalid),
            ));
        }
        unsafe {
            // Whether or not we successfully clear, this WaitSet will count as uninitialized
            self.initialized = false;
            to_rcl_result(rcl_wait_set_clear(self.wait_set.borrow_mut() as *mut _))
                .map_err(WaitSetErrorResponse::ReturnCode)
        }
    }
pub fn clear ( & mut self ) -> Result < ( ) , WaitSetErrorResponse > { if ! self . initialized { return Err ( WaitSetErrorResponse :: ReturnCode ( RclReturnCode :: WaitSetError ( WaitSetErrorCode :: WaitSetInvalid ) , ) ) ; } unsafe { // Whether or not we successfully clear, this WaitSet will count as uninitialized self . initialized = false ; to_rcl_result ( rcl_wait_set_clear ( self . wait_set . borrow_mut ( ) as * mut _ ) ) . map_err ( WaitSetErrorResponse :: ReturnCode ) } }
Removes (sets to NULL) all entities in the WaitSet
Removes ( sets to NULL ) all entities in the WaitSet
&mut self
&mut self
errors
`RclError::InvalidArgument` if any arguments are invalid.
`RclError::WaitSetInvalid` if the WaitSet is already zero-initialized.
`RclError::Error` for an unspecified error
` RclError :: InvalidArgument ` if any arguments are invalid . ` RclError :: WaitSetInvalid ` if the WaitSet is already zero - initialized . ` RclError :: Error ` for an unspecified error