pub struct Releases { /* private fields */ }Expand description
The releases a tree is merged from, in ascending order.
Implementations§
Source§impl Releases
impl Releases
Sourcepub fn new(minors: Vec<u32>) -> Result<Self, String>
pub fn new(minors: Vec<u32>) -> Result<Self, String>
The releases, which have to be ascending, distinct and at least two.
At least two because merging one release is copying it, and a tool that accepts that silently is a tool somebody will run by mistake and ship the result of.
Sourcepub fn condition(&self, present: &[bool]) -> Option<String>
pub fn condition(&self, present: &[bool]) -> Option<String>
The condition that holds for exactly the releases marked in present, or None when that
is all of them and no conditional is wanted.
A release between two surveyed ones belongs to the older of the two, because that is what the bounds say and because the alternative is claiming to know what a release we did not look at contains.
§Panics
When present is not one flag per release, which is a mistake in the caller.
Trait Implementations§
impl Eq for Releases
impl StructuralPartialEq for Releases
Auto Trait Implementations§
impl Freeze for Releases
impl RefUnwindSafe for Releases
impl Send for Releases
impl Sync for Releases
impl Unpin for Releases
impl UnsafeUnpin for Releases
impl UnwindSafe for Releases
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