pub struct SourceEntry {
pub enabled: bool,
pub source: bool,
pub options: Vec<(String, Vec<String>)>,
pub url: String,
pub suite: String,
pub components: Vec<String>,
pub archs: Option<Vec<String>>,
pub signed_by: Option<Signature>,
pub trusted: bool,
pub is_deb822: bool,
}
Expand description
An apt source entry that is active on the system.
Fields§
§enabled: bool
Whether the entry is enabled or not.
source: bool
Whether this is a binary or source repo.
options: Vec<(String, Vec<String>)>
Some repos may have special options defined.
url: String
The URL of the repo.
suite: String
The suite of the repo would be as bionic
or cosmic
.
components: Vec<String>
Components that have been enabled for this repo.
archs: Option<Vec<String>>
Architectures binaries from this repository run on
signed_by: Option<Signature>
signed-by
trusted: bool
Trusted
is_deb822: bool
Implementations§
Source§impl SourceEntry
impl SourceEntry
pub fn url(&self) -> &str
Sourcepub fn filename(&self) -> String
pub fn filename(&self) -> String
The base filename to be used when storing files for this entries.
Sourcepub fn dist_path(&self) -> String
pub fn dist_path(&self) -> String
Returns the root URL for this entry’s dist path.
For an entry such as:
deb http://us.archive.ubuntu.com/ubuntu/ cosmic main
The path that will be returned will be:
http://us.archive.ubuntu.com/ubuntu/dists/cosmic
pub fn dist_path_get(&self, path: &str) -> String
Sourcepub fn dist_components(&self) -> impl Iterator<Item = String> + '_
pub fn dist_components(&self) -> impl Iterator<Item = String> + '_
Iterator that returns each of the dist components that are to be fetched.
Trait Implementations§
Source§impl Clone for SourceEntry
impl Clone for SourceEntry
Source§fn clone(&self) -> SourceEntry
fn clone(&self) -> SourceEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SourceEntry
impl Debug for SourceEntry
Source§impl Display for SourceEntry
impl Display for SourceEntry
Source§impl FromStr for SourceEntry
impl FromStr for SourceEntry
Source§impl Hash for SourceEntry
impl Hash for SourceEntry
Source§impl PartialEq for SourceEntry
impl PartialEq for SourceEntry
impl Eq for SourceEntry
impl StructuralPartialEq for SourceEntry
Auto Trait Implementations§
impl Freeze for SourceEntry
impl RefUnwindSafe for SourceEntry
impl Send for SourceEntry
impl Sync for SourceEntry
impl Unpin for SourceEntry
impl UnwindSafe for SourceEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more