pub struct LegacyRepository {Show 14 fields
pub typ: RepositoryType,
pub uri: Url,
pub suite: String,
pub components: Vec<String>,
pub architectures: Vec<String>,
pub languages: Vec<String>,
pub targets: Vec<String>,
pub pdiffs: Option<bool>,
pub by_hash: Option<YesNoForce>,
pub allow_insecure: bool,
pub allow_weak: bool,
pub allow_downgrade_to_insecure: bool,
pub trusted: Option<bool>,
pub signature: Option<Signature>,
/* private fields */
}Expand description
A structure representing APT repository as declared by one-line-style .list file:
type [option=value option=value...] uri suite [component] [component] [...]According to sources.list(5) man pages, only four fields are mandatory:
typeeitherdebordeb-srcurito repository holding valid APT structuresuiteusually being distribution codenamecomponentmost of the timemain, but it’s a section of the repository; multiple values allowed
The disabled field is just commented out with # followed by whitespaces at the beginning of the valid line
The manpage specifies following optional fields
archcomma separated list of binary architectureslangcomma separated list of supported natural languagestargetpdiffsis a yes/no fieldby-hashis a yes/no/force fieldallow-insecureis a yes/no field, default noallow-weakis a yes/no field, default noallow-downgrade-to-insecureis a yes/no field, default notrustedus a yes/no fieldsigned-byis a path to the key or fingerprint; optionally followed by exclamation markcheck-valid-untilis a yes/no fieldvalid-until-minvalid-until-maxcheck-dateis a yes/no fielddate-max-futureinrelease-pathrelative pathsnapshoteitherenableor a snapshot ID
Note: this module doesn’t support undocumented options.
Fields§
§typ: RepositoryTypeLegacy lists format support one type per line
uri: UrlSingle repo address; according to Debian that’s URI, but this type is more advanced than URI from http crate
suite: StringThe distribution name as codename or suite type (like stable or testing)
components: Vec<String>(Optional) Section of the repository, usually main, contrib or non-free
return None if repository is Flat Repository Format (https://wiki.debian.org/DebianRepository/Format#Flat_Repository_Format)
architectures: Vec<String>(Optional) Architectures binaries from this repository run on
languages: Vec<String>(Optional) Translations support to download
targets: Vec<String>(Optional) Download targets to acquire from this source
pdiffs: Option<bool>(Optional) Controls if APT should try PDiffs instead of downloading indexes entirely; if not set defaults to configuration option Acquire::PDiffs
by_hash: Option<YesNoForce>(Optional) Controls if APT should try to acquire indexes via a URI constructed from a hashsum of the expected file
allow_insecure: bool(Optional) If yes circumvents parts of apt-secure, don’t thread lightly
allow_weak: bool(Optional) If yes circumvents parts of apt-secure, don’t thread lightly
allow_downgrade_to_insecure: bool(Optional) If yes circumvents parts of apt-secure, don’t thread lightly
trusted: Option<bool>(Optional) If set forces whether APT considers source as trusted or no (default not present is a third state)
signature: Option<Signature>(Optional) Contains either absolute path to GPG keyring or embedded GPG public key block, if not set APT uses all trusted keys; I can’t find example of using with fingerprints
Trait Implementations§
Source§impl Clone for LegacyRepository
impl Clone for LegacyRepository
Source§fn clone(&self) -> LegacyRepository
fn clone(&self) -> LegacyRepository
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LegacyRepository
impl Debug for LegacyRepository
Source§impl Default for LegacyRepository
impl Default for LegacyRepository
Source§impl Display for LegacyRepository
impl Display for LegacyRepository
Source§impl From<&LegacyRepository> for Repository
impl From<&LegacyRepository> for Repository
Source§fn from(original: &LegacyRepository) -> Self
fn from(original: &LegacyRepository) -> Self
Source§impl From<LegacyRepository> for Repository
impl From<LegacyRepository> for Repository
Source§fn from(original: LegacyRepository) -> Self
fn from(original: LegacyRepository) -> Self
Source§impl PartialEq for LegacyRepository
impl PartialEq for LegacyRepository
Source§fn eq(&self, other: &LegacyRepository) -> bool
fn eq(&self, other: &LegacyRepository) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LegacyRepository
Auto Trait Implementations§
impl Freeze for LegacyRepository
impl RefUnwindSafe for LegacyRepository
impl Send for LegacyRepository
impl Sync for LegacyRepository
impl Unpin for LegacyRepository
impl UnsafeUnpin for LegacyRepository
impl UnwindSafe for LegacyRepository
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more