pub struct DefectSample {
pub features: CommitFeatures,
pub is_defect: bool,
pub category: Option<DefectCategory>,
}Expand description
Training sample for defect prediction
Fields§
§features: CommitFeaturesCommit features
is_defect: boolWhether this commit introduced a defect
category: Option<DefectCategory>Defect category (if known)
Implementations§
Source§impl DefectSample
impl DefectSample
Sourcepub fn new(features: CommitFeatures, is_defect: bool) -> Self
pub fn new(features: CommitFeatures, is_defect: bool) -> Self
Create new sample
Sourcepub fn with_category(self, category: DefectCategory) -> Self
pub fn with_category(self, category: DefectCategory) -> Self
Create with category
Trait Implementations§
Source§impl Clone for DefectSample
impl Clone for DefectSample
Source§fn clone(&self) -> DefectSample
fn clone(&self) -> DefectSample
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 DefectSample
impl Debug for DefectSample
Source§impl<'de> Deserialize<'de> for DefectSample
impl<'de> Deserialize<'de> for DefectSample
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DefectSample
impl RefUnwindSafe for DefectSample
impl Send for DefectSample
impl Sync for DefectSample
impl Unpin for DefectSample
impl UnsafeUnpin for DefectSample
impl UnwindSafe for DefectSample
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
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>
Converts
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>
Converts
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