Struct Repo

Source
pub struct Repo { /* private fields */ }
Expand description

Rdedup repository handle

Implementations§

Source§

impl Repo

Source

pub fn unlock_decrypt(&self, pass: PassphraseFn<'_>) -> Result<DecryptHandle>

Source

pub fn unlock_encrypt(&self, pass: PassphraseFn<'_>) -> Result<EncryptHandle>

Source

pub fn init<L>( url: &Url, passphrase: PassphraseFn<'_>, settings: Repo, log: L, ) -> Result<Repo>
where L: Into<Option<Logger>>,

Create new rdedup repository

Source

pub fn open<L>(url: &Url, log: L) -> Result<Repo>
where L: Into<Option<Logger>>,

Source

pub fn init_custom<L>( url: &Url, backend_select: BackendSelectFn, passphrase: PassphraseFn<'_>, settings: Repo, log: L, ) -> Result<Repo>
where L: Into<Option<Logger>>,

Create new rdedup repository

Source

pub fn open_custom<L>( url: &Url, backend_select: BackendSelectFn, log: L, ) -> Result<Repo>
where L: Into<Option<Logger>>,

Source

pub fn change_passphrase( &mut self, old_p: PassphraseFn<'_>, new_p: PassphraseFn<'_>, ) -> Result<()>

Change the passphrase

Source

pub fn list_names(&self) -> Result<Vec<String>>

Source

pub fn rm(&self, name: &str) -> Result<()>

Remove a stored name from repo

Source

pub fn gc(&self, min_age_secs: u64) -> Result<()>

Source

pub fn read<W: Write>( &self, name_str: &str, writer: &mut W, dec: &DecryptHandle, ) -> Result<()>

Source

pub fn du(&self, name_str: &str, dec: &DecryptHandle) -> Result<DuResults>

Source

pub fn verify( &self, name_str: &str, dec: &DecryptHandle, ) -> Result<VerifyResults>

Source

pub fn write<R>( &self, name_str: &str, reader: R, enc: &EncryptHandle, ) -> Result<WriteStats>
where R: Read + Send,

Trait Implementations§

Source§

impl Clone for Repo

Source§

fn clone(&self) -> Repo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for Repo

§

impl !RefUnwindSafe for Repo

§

impl Send for Repo

§

impl Sync for Repo

§

impl Unpin for Repo

§

impl !UnwindSafe for Repo

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> Typeable for T
where T: Any,

Source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Erased for T