Struct alpm::Alpm

source ·
pub struct Alpm { /* private fields */ }

Implementations§

source§

impl Alpm

source

pub fn trans_add_pkg<P: IntoPkgAdd>(&self, pkg: P) -> Result<(), AddError<P>>

source§

impl Alpm

source

pub fn new<S: Into<Vec<u8>>>(root: S, db_path: S) -> Result<Alpm>

source

pub fn new2(root: &str, db_path: &str) -> Result<Alpm>

source

pub fn release(self) -> Result<(), ReleaseError>

source§

impl Alpm

source

pub fn pkg_load<S: Into<Vec<u8>>>( &self, filename: S, full: bool, level: SigLevel ) -> Result<LoadedPackage<'_>>

source§

impl Alpm

source

pub fn set_log_cb<T: 'static, F: FnMut(LogLevel, &str, &mut T) + 'static>( &self, data: T, f: F )

source

pub fn set_dl_cb<T: 'static, F: FnMut(&str, AnyDownloadEvent<'_>, &mut T) + 'static>( &self, data: T, f: F )

source

pub fn set_event_cb<T: 'static, F: FnMut(AnyEvent<'_>, &mut T) + 'static>( &self, data: T, f: F )

source

pub fn set_progress_cb<T: 'static, F: FnMut(Progress, &str, i32, usize, usize, &mut T) + 'static>( &self, data: T, f: F )

source

pub fn set_question_cb<T: 'static, F: FnMut(AnyQuestion<'_>, &mut T) + 'static>( &self, data: T, f: F )

source

pub fn set_fetch_cb<T: 'static, F: FnMut(&str, &str, bool, &mut T) -> FetchResult + 'static>( &self, data: T, f: F )

source

pub fn take_raw_log_cb(&self) -> RawLogCb

source

pub fn set_raw_log_cb(&self, cb: RawLogCb)

source

pub fn take_raw_dl_cb(&self) -> RawDlCb

source

pub fn set_raw_dl_cb(&self, cb: RawDlCb)

source

pub fn take_raw_event_cb(&self) -> RawEventCb

source

pub fn set_raw_event_cb(&self, cb: RawEventCb)

source

pub fn take_raw_progress_cb(&self) -> RawProgressCb

source

pub fn set_raw_progress_cb(&self, cb: RawProgressCb)

source

pub fn take_raw_question_cb(&self) -> RawQuestionCb

source

pub fn set_raw_question_cb(&self, cb: RawQuestionCb)

source

pub fn take_raw_fetch_cb(&self) -> RawFetchCb

source

pub fn set_raw_fetch_cb(&self, cb: RawFetchCb)

source§

impl Alpm

source

pub fn check_conflicts<'a, P: 'a + AsPkg + AsAlpmListItemPtr<'a>, L: IntoRawAlpmList<'a, P>>( &self, list: L ) -> AlpmListMut<'_, OwnedConflict>

source§

impl Alpm

source

pub fn register_syncdb<S: Into<Vec<u8>>>( &self, name: S, sig_level: SigLevel ) -> Result<Db<'_>>

source

pub fn register_syncdb_mut<S: Into<Vec<u8>>>( &mut self, name: S, sig_level: SigLevel ) -> Result<DbMut<'_>>

source

pub fn unregister_all_syncdbs(&mut self) -> Result<()>

source§

impl Alpm

source

pub fn check_deps<'a>( &self, pkgs: impl IntoRawAlpmList<'a, Package<'a>>, rem: impl IntoRawAlpmList<'a, Package<'a>>, upgrade: impl IntoRawAlpmList<'a, Package<'a>>, reverse_deps: bool ) -> AlpmListMut<'_, DependMissing>

source§

impl Alpm

source

pub fn fetch_pkgurl<'a, L: IntoRawAlpmList<'a, String>>( &'a self, urls: L ) -> Result<AlpmListMut<'a, String>>

source§

impl Alpm

source

pub fn last_error(&self) -> Error

source§

impl Alpm

source

pub fn as_alpm_handle_t(&self) -> *mut alpm_handle_t

source

pub fn unlock(&self) -> Result<()>

source

pub fn root(&self) -> &str

source

pub fn dbpath(&self) -> &str

source

pub fn hookdirs(&self) -> AlpmList<'_, &str>

source

pub fn cachedirs(&self) -> AlpmList<'_, &str>

source

pub fn lockfile(&self) -> &str

source

pub fn gpgdir(&self) -> &str

source

pub fn use_syslog(&self) -> bool

source

pub fn noupgrades(&self) -> AlpmList<'_, &str>

source

pub fn noextracts(&self) -> AlpmList<'_, &str>

source

pub fn ignorepkgs(&self) -> AlpmList<'_, &str>

source

pub fn ignoregroups(&self) -> AlpmList<'_, &str>

source

pub fn overwrite_files(&self) -> AlpmList<'_, &str>

source

pub fn assume_installed(&self) -> AlpmList<'_, Depend>

source

pub fn architectures(&self) -> AlpmList<'_, &str>

source

pub fn check_space(&self) -> bool

source

pub fn dbext(&self) -> &str

source

pub fn add_hookdir<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_hookdirs<'a, T: IntoRawAlpmList<'a, String>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_hookdir<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn add_cachedir<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_cachedirs<'a, T: IntoRawAlpmList<'a, String>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_cachedir<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn logfile(&self) -> Option<&str>

source

pub fn set_logfile<S: Into<Vec<u8>>>(&self, s: S) -> Result<()>

source

pub fn set_gpgdir<S: Into<Vec<u8>>>(&self, s: S) -> Result<()>

source

pub fn set_use_syslog(&self, b: bool)

source

pub fn add_noupgrade<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_noupgrades<'a, T: IntoRawAlpmList<'a, String>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_noupgrade<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn match_noupgrade<S: Into<Vec<u8>>>(&mut self, s: S) -> Match

source

pub fn add_noextract<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_noextracts<'a, T: IntoRawAlpmList<'a, String>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_noextract<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn match_noextract<S: Into<Vec<u8>>>(&mut self, s: S) -> Match

source

pub fn add_ignorepkg<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_ignorepkgs<'a, T: IntoRawAlpmList<'a, String>>( &mut self, list: T ) -> Result<()>

source

pub fn remove_ignorepkg<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn add_ignoregroup<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_ignoregroups<'a, T: IntoRawAlpmList<'a, String>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_ignoregroup<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn add_overwrite_file<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_overwrite_files<'a, T: IntoRawAlpmList<'a, String>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_overwrite_file<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn add_assume_installed(&mut self, s: &Dep<'_>) -> Result<()>

source

pub fn set_assume_installed<'a, T: IntoRawAlpmList<'a, Dep<'a>>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_assume_installed<D: AsDep>(&mut self, s: D) -> Result<bool>

source

pub fn add_architecture<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<()>

source

pub fn set_architectures<'a, T: IntoRawAlpmList<'a, String>>( &'a mut self, list: T ) -> Result<()>

source

pub fn remove_architecture<S: Into<Vec<u8>>>(&mut self, s: S) -> Result<bool>

source

pub fn localdb(&self) -> Db<'_>

source

pub fn syncdbs(&self) -> AlpmList<'_, Db<'_>>

source

pub fn syncdbs_mut(&mut self) -> AlpmList<'_, DbMut<'_>>

source

pub fn set_check_space(&self, b: bool)

source

pub fn set_dbext<S: Into<Vec<u8>>>(&self, s: S)

source

pub fn set_default_siglevel(&self, s: SigLevel) -> Result<()>

source

pub fn default_siglevel(&self) -> SigLevel

source

pub fn set_local_file_siglevel(&self, s: SigLevel) -> Result<()>

source

pub fn local_file_siglevel(&self) -> SigLevel

source

pub fn set_remote_file_siglevel(&self, s: SigLevel) -> Result<()>

source

pub fn remote_file_siglevel(&self) -> SigLevel

source

pub fn set_disable_dl_timeout(&self, b: bool)

source

pub fn set_parallel_downloads(&self, n: u32)

source§

impl Alpm

source

pub fn log_action<S1: Into<Vec<u8>>, S2: Into<Vec<u8>>>( &self, prefix: S1, msg: S2 ) -> Result<(), Error>

source§

impl Alpm

source

pub fn trans_remove_pkg(&self, pkg: Package<'_>) -> Result<()>

source§

impl Alpm

source

pub fn extract_keyid<'a, S: Into<Vec<u8>>>( &'a self, ident: S, sig: &[u8] ) -> Result<AlpmListMut<'a, String>>

source§

impl Alpm

source

pub fn find_group_pkgs<'a, S: Into<Vec<u8>>>( &'a self, dbs: AlpmList<'_, Db<'_>>, s: S ) -> AlpmListMut<'a, Package<'a>>

source§

impl Alpm

source

pub fn sync_sysupgrade(&self, enable_downgrade: bool) -> Result<()>

source§

impl Alpm

source

pub fn trans_flags(self) -> TransFlag

source

pub fn trans_prepare(&mut self) -> Result<(), (PrepareResult<'_>, Error)>

source

pub fn trans_commit(&mut self) -> Result<(), (CommitResult<'_>, Error)>

source

pub fn trans_interrupt(&mut self) -> Result<()>

source

pub fn trans_add(&self) -> AlpmList<'_, Package<'_>>

source

pub fn trans_remove(&self) -> AlpmList<'_, Package<'_>>

source

pub fn trans_release(&mut self) -> Result<()>

source§

impl Alpm

source

pub fn trans_init(&self, flags: TransFlag) -> Result<()>

Trait Implementations§

source§

impl Debug for Alpm

source§

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

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

impl Drop for Alpm

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for Alpm

Auto Trait Implementations§

§

impl !RefUnwindSafe for Alpm

§

impl !Sync for Alpm

§

impl Unpin for Alpm

§

impl !UnwindSafe for Alpm

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, 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>,

§

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>,

§

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.