self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_button_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_button_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_toggle_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_toggle_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_linkbutton_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_linkbutton_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_container_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_frame_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_splitpane_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_tabview_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_imageviewer_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_label_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_label_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_list_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_list_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_list_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_list_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_sourcelist_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_sourcelist_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_textarea_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_textarea_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_textfield_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_textfield_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn visibility_states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn visibility_state<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_webview_args_set_visibility_states(self.args, states.as_ptr(), states.len() as c_int);
}
self
}
- pub fn states(&mut self, states: &[i32]) -> &mut Self {
+ pub fn states<S: Copy + Into<i32>>(&mut self, states: &[S]) -> &mut Self {
+ let states: Vec<i32> = states.iter().copied().map(Into::into).collect();
unsafe {
ui_webview_args_set_states(self.args, states.as_ptr(), states.len() as c_int);
}