pub struct Comment {
pub text: String,
pub remove_when_valid: bool,
}
Expand description
A comment to be added in a RetrievedDependency
once it has been retrieved or validated.
It normally adds information about what went wrong.
Fields§
§text: String
The comment text.
remove_when_valid: bool
If true, the comment won’t be shown if the dependency is valid.
Implementations§
Source§impl Comment
impl Comment
Sourcepub fn removable(text: impl Into<String>) -> Self
pub fn removable(text: impl Into<String>) -> Self
Builds a removable comment. This basically mean it won’t be shown if the dependency is flagged as valid.
Sourcepub fn non_removable(text: impl Into<String>) -> Self
pub fn non_removable(text: impl Into<String>) -> Self
Builds a non removable comment. This comment will be shown no matter if the dependency is valid or not.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Comment
impl<'de> Deserialize<'de> for Comment
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
Source§impl Ord for Comment
impl Ord for Comment
Source§impl PartialOrd for Comment
impl PartialOrd for Comment
impl Eq for Comment
impl StructuralPartialEq for Comment
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnwindSafe for Comment
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.