Struct EverythingGlobal

Source
#[non_exhaustive]
pub struct EverythingGlobal {}

Implementations§

Source§

impl EverythingGlobal

Source

pub fn searcher<'a>(&'a mut self) -> EverythingSearcher<'a>

New the only one searcher.

There is at most one searcher can exist globally at the same time.

Source

pub fn version(&self) -> Result<(u32, u32, u32, u32, TargetMachine)>

Everything uses the version format: <major>.<minor>.<revision>.<build>. The build part is incremental and unique for all Everything versions.

Source

pub fn get_major_version(&self) -> Result<u32>

Source

pub fn get_minor_version(&self) -> Result<u32>

Source

pub fn get_revision(&self) -> Result<u32>

Source

pub fn get_build_number(&self) -> Result<u32>

Source

pub fn get_target_machine(&self) -> Result<TargetMachine>

Source

pub fn save_and_exit(&mut self) -> Result<bool>

Request Everything to save settings and data to disk and exit.

Source

pub fn is_db_loaded(&self) -> Result<bool>

Check if Everything’s database is loaded.

When Everything is loading, any queries will appear to return no results. Use this to determine if the database has been loaded before performing a query.

Source

pub fn is_admin(&self) -> Result<bool>

Check if Everything is running as administrator or as a standard user.

Source

pub fn is_appdata(&self) -> Result<bool>

Check if Everything is saving settings and data to %APPDATA%\Everything or to the same location as the Everything.exe.

Source

pub fn rebuild_db(&mut self) -> Result<bool>

Request Everything to forcefully rebuild the Everything index.

Requesting a rebuild will mark all indexes as dirty and start the rebuild process. Use self.is_db_loaded() to determine if the database has been rebuilt before performing a query.

Source

pub fn update_all_folder_indexes(&mut self) -> Result<bool>

Request Everything to rescan all folder indexes.

Everything will begin updating all folder indexes in the background.

Source

pub fn save_db(&mut self) -> Result<bool>

Request Everything to save the index to disk.

The index is only saved to disk when you exit Everything. Call this to write the index to the file: Everything.db.

Source

pub fn save_run_history(&mut self) -> Result<bool>

Request Everything to save the run history to disk.

The run history is only saved to disk when you close an Everything search window or exit Everything. Call this to write the run history to the file: Run History.csv.

Source

pub fn delete_run_history(&mut self) -> Result<bool>

Delete all run history.

Calling this function will clear all run history from memory and disk.

Source

pub fn get_run_count(&self, filename: impl AsRef<Path>) -> Result<u32>

Gets the run count from a specified file in the Everything index by file name.

Source

pub fn set_run_count( &mut self, filename: impl AsRef<Path>, run_count: u32, ) -> Result<()>

Sets the run count for a specified file in the Everything index by file name.

Source

pub fn inc_run_count(&mut self, filename: impl AsRef<Path>) -> Result<u32>

Increments the run count by one for a specified file in the Everything by file name.

Source

pub fn is_fast_sort(&self, sort_type: SortType) -> Result<bool>

Check if the specified file information is indexed and has fast sort enabled.

Source

pub fn is_file_info_indexed(&self, file_info_type: FileInfoType) -> Result<bool>

Check if the specified file information is indexed.

Trait Implementations§

Source§

impl Debug for EverythingGlobal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for EverythingGlobal

Source§

fn drop(&mut self)

NEVER call this, as the static variable would not be dropped.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more