Struct libalpm::Db
[−]
[src]
pub struct Db<'a> { /* fields omitted */ }
A database of packages. This is only ever available as a reference
Methods
impl<'a> Db<'a>
[src]
fn name(&self) -> Result<&'a str, Utf8Error>
Gets the name of the database.
fn siglevel(&self) -> SigLevel
Gets the signature checking level of the database.
fn is_valid(&self) -> AlpmResult<()>
Checks the database is valid. If not, an error
fn servers(&self) -> Vec<&str>
Gets a list of the servers used by the database.
fn set_servers<R>(&self, servers: Vec<R>) -> AlpmResult<()> where
R: AsRef<str>,
R: AsRef<str>,
Sets the servers used by the database.
fn add_server(&self, url: &str) -> AlpmResult<()>
Adds a server to the list of servers used by the database.
fn remove_server(&self, url: &str) -> AlpmResult<()>
Removes a server from the list of servers used by the database.
fn update(&self, force: bool) -> AlpmResult<()>
Update (sync) the database with remote.
If force is set to false
and the database is up to date the function will return
successfully without doing anything.
fn pkg(&self, name: &str) -> AlpmResult<&'a PackageRef>
Gets a package with the given name from the database
fn pkg_cache(&self) -> Vec<&PackageRef>
Gets all packages in the db cache
fn group(&self, name: &str) -> AlpmResult<Group<'a>>
Gets a package group from the database by name.
fn group_cache(&self) -> AlpmResult<Vec<Group<'a>>>
Gets the package group cache of the database.
fn search(&self, needles: Vec<&str>) -> AlpmResult<Vec<&PackageRef>>
Searches the database for packages matching the needles.
This function has a memory leak, but I'm 99% sure it's internal to libalpm. Needs more testing.
fn set_usage(&self, usage: Usage) -> AlpmResult<()>
Sets what this database is to be used for.
fn usage(&self) -> AlpmResult<Usage>
Gets what this database is to be used for.