pub struct ViewData {
pub view_name: String,
pub view_type: Option<String>,
pub property: Option<Value>,
}Expand description
视图数据
Fields§
§view_name: String视图名称
view_type: Option<String>视图类型,可选值:grid (表格视图)、kanban (看板视图)、gallery (画册视图)、gantt (甘特视图)
property: Option<Value>视图的自定义属性,当前支持的视图自定义属性参考视图类型
Implementations§
Source§impl ViewData
impl ViewData
Sourcepub fn kanban_view(view_name: impl ToString) -> Self
pub fn kanban_view(view_name: impl ToString) -> Self
创建看板视图
Sourcepub fn gallery_view(view_name: impl ToString) -> Self
pub fn gallery_view(view_name: impl ToString) -> Self
创建画册视图
Sourcepub fn gantt_view(view_name: impl ToString) -> Self
pub fn gantt_view(view_name: impl ToString) -> Self
创建甘特视图
Sourcepub fn with_view_type(self, view_type: impl ToString) -> Self
pub fn with_view_type(self, view_type: impl ToString) -> Self
设置视图类型
Sourcepub fn with_property(self, property: Value) -> Self
pub fn with_property(self, property: Value) -> Self
设置视图属性
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ViewData
impl<'de> Deserialize<'de> for ViewData
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ViewData
impl RefUnwindSafe for ViewData
impl Send for ViewData
impl Sync for ViewData
impl Unpin for ViewData
impl UnwindSafe for ViewData
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
Mutably borrows from an owned value. Read more