pub struct TreeViewSpec {
pub id_field: FieldRef,
pub parent_field: FieldRef,
pub label_field: FieldRef,
pub max_nodes: Option<usize>,
}Expand description
通用树 View 的显式拓扑声明。
树拓扑属于 View 语义,不能从字段存储类型或约定列名推断。三个字段都必须同时
出现在所属 ViewSpec 中,并在构建期解析到同一张主表。
Fields§
§id_field: FieldRef节点唯一标识字段。
parent_field: FieldRef父节点标识字段;根节点应返回 null。
label_field: FieldRef节点用户可见标签字段。
max_nodes: Option<usize>单次树查询的节点上限;None 回退到服务端默认值
(crate::table::DEFAULT_TREE_MAX_NODES)。
Implementations§
Trait Implementations§
Source§impl Clone for TreeViewSpec
impl Clone for TreeViewSpec
Source§fn clone(&self) -> TreeViewSpec
fn clone(&self) -> TreeViewSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TreeViewSpec
impl Debug for TreeViewSpec
impl Eq for TreeViewSpec
Source§impl PartialEq for TreeViewSpec
impl PartialEq for TreeViewSpec
impl StructuralPartialEq for TreeViewSpec
Auto Trait Implementations§
impl Freeze for TreeViewSpec
impl RefUnwindSafe for TreeViewSpec
impl Send for TreeViewSpec
impl Sync for TreeViewSpec
impl Unpin for TreeViewSpec
impl UnsafeUnpin for TreeViewSpec
impl UnwindSafe for TreeViewSpec
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more