pub struct ExclusionManager { /* private fields */ }Expand description
Управляет логикой исключения файлов и папок.
Содержит в себе TemplateManager для доступа к шаблонам,
а также списки включенных шаблонов и пользовательских паттернов.
Implementations§
Source§impl ExclusionManager
impl ExclusionManager
Sourcepub async fn enable_templates_for_project(
&mut self,
project_path: &Path,
) -> Result<()>
pub async fn enable_templates_for_project( &mut self, project_path: &Path, ) -> Result<()>
Автоматически включает шаблоны, релевантные для указанного проекта.
Определяет тип проекта по наличию характерных файлов (например, Cargo.toml).
Sourcepub fn get_all_patterns(&self) -> Vec<String>
pub fn get_all_patterns(&self) -> Vec<String>
Возвращает все паттерны из включенных шаблонов.
Sourcepub async fn get_folder_patterns(&self) -> HashSet<String>
pub async fn get_folder_patterns(&self) -> HashSet<String>
Возвращает набор паттернов для исключения папок.
Sourcepub async fn get_extension_patterns(&self) -> HashSet<String>
pub async fn get_extension_patterns(&self) -> HashSet<String>
Возвращает набор паттернов для исключения файлов по расширению.
Sourcepub fn get_enabled_templates(&self) -> Vec<&str>
pub fn get_enabled_templates(&self) -> Vec<&str>
Возвращает список включенных шаблонов.
Sourcepub fn enable_template(&mut self, template_key: String)
pub fn enable_template(&mut self, template_key: String)
Включает шаблон по ключу.
Sourcepub fn disable_template(&mut self, template_key: &str)
pub fn disable_template(&mut self, template_key: &str)
Отключает шаблон по ключу.
Sourcepub async fn force_update_templates(&mut self) -> Result<()>
pub async fn force_update_templates(&mut self) -> Result<()>
Принудительно обновляет шаблоны через TemplateManager.
Sourcepub async fn get_available_templates(&self) -> Vec<String>
pub async fn get_available_templates(&self) -> Vec<String>
Возвращает список всех доступных шаблонов.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExclusionManager
impl RefUnwindSafe for ExclusionManager
impl Send for ExclusionManager
impl Sync for ExclusionManager
impl Unpin for ExclusionManager
impl UnwindSafe for ExclusionManager
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> 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