pub struct DocItem {Show 14 fields
pub id: String,
pub name: String,
pub doc_type: DocType,
pub content: String,
pub signature: Option<String>,
pub file_path: PathBuf,
pub line_number: Option<usize>,
pub parent_id: Option<String>,
pub children: Vec<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub metadata: HashMap<String, Value>,
pub related_items: Vec<String>,
pub tags: Vec<String>,
}Expand description
ドキュメント項目
Fields§
§id: StringユニークID
name: String名前
doc_type: DocTypeドキュメントの種類
content: Stringドキュメント本文
signature: Option<String>署名(関数や型のシグネチャ)
file_path: PathBufファイルパス
line_number: Option<usize>行番号
parent_id: Option<String>親要素のID
children: Vec<String>子要素のIDリスト
created_at: DateTime<Utc>作成日時
updated_at: DateTime<Utc>更新日時
metadata: HashMap<String, Value>メタデータ
関連項目
タグ
Implementations§
Source§impl DocItem
impl DocItem
Sourcepub fn with_file_path(self, path: PathBuf) -> Self
pub fn with_file_path(self, path: PathBuf) -> Self
ファイルパスを設定
Sourcepub fn with_line_number(self, line: usize) -> Self
pub fn with_line_number(self, line: usize) -> Self
行番号を設定
Sourcepub fn with_signature(self, signature: String) -> Self
pub fn with_signature(self, signature: String) -> Self
署名を設定
Sourcepub fn with_parent(self, parent_id: String) -> Self
pub fn with_parent(self, parent_id: String) -> Self
親要素を設定
Sourcepub fn with_metadata(self, key: String, value: Value) -> Self
pub fn with_metadata(self, key: String, value: Value) -> Self
メタデータを設定
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DocItem
impl<'de> Deserialize<'de> for DocItem
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 DocItem
impl RefUnwindSafe for DocItem
impl Send for DocItem
impl Sync for DocItem
impl Unpin for DocItem
impl UnwindSafe for DocItem
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