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
Auto Trait Implementations§
impl Freeze for RelationBuilder
impl RefUnwindSafe for RelationBuilder
impl Send for RelationBuilder
impl Sync for RelationBuilder
impl Unpin for RelationBuilder
impl UnwindSafe for RelationBuilder
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