pub struct RelationBuilder { /* private fields */ }Expand description
A builder for creating a Relation
§Example
use debian_control::lossless::relations::{Relation};
use debian_control::relations::VersionConstraint;
let relation = Relation::build("samba")
.version_constraint(VersionConstraint::GreaterThanEqual, "2.0".parse().unwrap())
.archqual("any")
.architectures(vec!["amd64".to_string(), "i386".to_string()])
.build();
assert_eq!(relation.to_string(), "samba:any (>= 2.0) [amd64 i386]");Implementations§
Source§impl RelationBuilder
impl RelationBuilder
Sourcepub fn version_constraint(self, vc: VersionConstraint, version: Version) -> Self
pub fn version_constraint(self, vc: VersionConstraint, version: Version) -> Self
Set the version constraint for this relation
Sourcepub fn architectures(self, architectures: Vec<String>) -> Self
pub fn architectures(self, architectures: Vec<String>) -> Self
Set the architectures for this relation
Sourcepub fn profiles(self, profiles: Vec<Vec<BuildProfile>>) -> Self
pub fn profiles(self, profiles: Vec<Vec<BuildProfile>>) -> Self
Set the build profiles for this relation
Sourcepub fn add_profile(self, profile: Vec<BuildProfile>) -> Self
pub fn add_profile(self, profile: Vec<BuildProfile>) -> Self
Add a build profile to this relation