pub struct KnowledgeExporter;Expand description
Knowledge exporter for generating YAML from KnowledgeArticle models
Implementations§
Source§impl KnowledgeExporter
impl KnowledgeExporter
Sourcepub fn export(&self, article: &KnowledgeArticle) -> Result<String, ExportError>
pub fn export(&self, article: &KnowledgeArticle) -> Result<String, ExportError>
Sourcepub fn export_without_validation(
&self,
article: &KnowledgeArticle,
) -> Result<String, ExportError>
pub fn export_without_validation( &self, article: &KnowledgeArticle, ) -> Result<String, ExportError>
Export a knowledge article without validation
Use this when you want to skip schema validation for performance or when exporting to a trusted destination.
Sourcepub fn export_index(
&self,
index: &KnowledgeIndex,
) -> Result<String, ExportError>
pub fn export_index( &self, index: &KnowledgeIndex, ) -> Result<String, ExportError>
Sourcepub fn export_to_directory(
&self,
articles: &[KnowledgeArticle],
dir_path: &Path,
workspace_name: &str,
) -> Result<usize, ExportError>
pub fn export_to_directory( &self, articles: &[KnowledgeArticle], dir_path: &Path, workspace_name: &str, ) -> Result<usize, ExportError>
Sourcepub fn export_domain_to_directory(
&self,
articles: &[KnowledgeArticle],
dir_path: &Path,
workspace_name: &str,
domain: &str,
) -> Result<usize, ExportError>
pub fn export_domain_to_directory( &self, articles: &[KnowledgeArticle], dir_path: &Path, workspace_name: &str, domain: &str, ) -> Result<usize, ExportError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KnowledgeExporter
impl RefUnwindSafe for KnowledgeExporter
impl Send for KnowledgeExporter
impl Sync for KnowledgeExporter
impl Unpin for KnowledgeExporter
impl UnwindSafe for KnowledgeExporter
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