Struct xcell_core::XTable

source ·
pub struct XTable {
    pub path: PathBuf,
    pub name: String,
    pub config: TableConfig,
    pub data: XTableKind,
    pub enumeration_linked: bool,
    pub output_generated: bool,
    pub sum_excel: u64,
    pub sum_config: u64,
}

Fields§

§path: PathBuf

表格的绝对路径

§name: String

表格的名称, 同时也是生成的类名

§config: TableConfig

表格的额外配置

§data: XTableKind

表格中的有效数据

§enumeration_linked: bool

枚举定义是否已链接

§output_generated: bool

产物是否已生成

§sum_excel: u64

Excel 的校验和

§sum_config: u64

全局配置和本地配置的校验和

Implementations§

加载配置表

Arguments
  • path: Excel 路径
  • global: 全局设置

returns: Result<XCellTable, XError>

Examples
use xcell_core::XTable;

强制重新加载表格中的数据

检测是否要重新加载表格

检测表格是否发生变化

检查配置是否发生变化

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more

是否要重新加载只取决于表格和配置是否发生变化

Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.