pub trait BmbpTree<T>where
T: BmbpTree<T>,{
// Required methods
fn get_code(&self) -> &Option<String>;
fn set_code(&mut self, code: Option<String>) -> &mut Self;
fn get_parent_code(&self) -> &Option<String>;
fn set_parent_code(&mut self, parent_code: Option<String>) -> &mut Self;
fn get_children(&self) -> &Option<Vec<T>>;
fn get_children_mut(&mut self) -> &mut Option<Vec<T>>;
fn set_children(&mut self, children: Option<Vec<T>>) -> &mut Self;
// Provided method
fn get_order(&self) -> usize { ... }
}Expand description
RdbcTree 定义树型抽象
Required Methods§
fn get_code(&self) -> &Option<String>
fn set_code(&mut self, code: Option<String>) -> &mut Self
fn get_parent_code(&self) -> &Option<String>
fn set_parent_code(&mut self, parent_code: Option<String>) -> &mut Self
fn get_children(&self) -> &Option<Vec<T>>
fn get_children_mut(&mut self) -> &mut Option<Vec<T>>
fn set_children(&mut self, children: Option<Vec<T>>) -> &mut Self
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.