[−][src]Struct osync::index::Index
Implementations
impl Index
[src]
pub fn load<P: AsRef<Path>>(directory: P) -> Result<Index, Box<dyn Error>>
[src]
Try to load the cached index for given directory this will either return the loaded index or a new blank one.
pub fn compute<P: AsRef<Path>>(
directory: P
) -> Result<(Index, usize), Box<dyn Error>>
[src]
directory: P
) -> Result<(Index, usize), Box<dyn Error>>
Compute the index for given directory.
pub fn save(&self) -> Result<(), Box<dyn Error>>
[src]
Save the index to the disk.
pub fn diff(&self, b: &Index) -> (Vec<String>, Vec<String>)
[src]
Compute the difference between the indexes self & b return the changed files (new, modified) and the deleted.
pub fn len(&self) -> usize
[src]
Returns the number of files in the index.
pub fn is_empty(&self) -> bool
[src]
Returns true
if the index contains no files.
pub fn path(&self) -> PathBuf
[src]
Returns the path which the index is computed for.
pub fn files(&self) -> HashMap<String, String>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnwindSafe for Index
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,