pub struct ColumnDescriptor {
pub attribute_name: String,
pub label: String,
pub format: Option<String>,
pub type_: ColumnDescriptorType,
pub width: Option<i32>,
/* private fields */
}Expand description
A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it,
and what the column’s label should be.
It is only used if the underlying UI actually supports this level of customization.
Fields§
§attribute_name: StringName of the attribute rendered in this column.
label: StringHeader UI label of column.
format: Option<String>Format to use for the rendered values in this column. TBD how the format strings looks like.
type_: ColumnDescriptorTypeDatatype of values in this column. Defaults to ‘string’ if not specified.
width: Option<i32>Width of this column in characters (hint only).
Implementations§
Source§impl ColumnDescriptor
impl ColumnDescriptor
Sourcepub fn builder() -> ColumnDescriptorBuilder<((), (), (), (), ())>
pub fn builder() -> ColumnDescriptorBuilder<((), (), (), (), ())>
Create a builder for building ColumnDescriptor.
On the builder, call .attribute_name(...), .label(...), .format(...)(optional), .type_(...)(optional), .width(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ColumnDescriptor.
Trait Implementations§
Source§impl Clone for ColumnDescriptor
impl Clone for ColumnDescriptor
Source§fn clone(&self) -> ColumnDescriptor
fn clone(&self) -> ColumnDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ColumnDescriptor
impl Debug for ColumnDescriptor
Source§impl<'de> Deserialize<'de> for ColumnDescriptor
impl<'de> Deserialize<'de> for ColumnDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ColumnDescriptor
impl PartialEq for ColumnDescriptor
Source§impl Serialize for ColumnDescriptor
impl Serialize for ColumnDescriptor
impl Eq for ColumnDescriptor
impl StructuralPartialEq for ColumnDescriptor
Auto Trait Implementations§
impl Freeze for ColumnDescriptor
impl RefUnwindSafe for ColumnDescriptor
impl Send for ColumnDescriptor
impl Sync for ColumnDescriptor
impl Unpin for ColumnDescriptor
impl UnwindSafe for ColumnDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.