pub struct Carrier {
pub path: String,
pub line: usize,
pub shape: &'static str,
pub text: String,
}Expand description
One version written down by hand where the tool’s own files live.
Where it is, to the line, and the shape it was written in — enough for the diagnostic to name the edit that removes it.
use majordomus_cli::release::version::{carrier_shape, Carrier};
let line = "FOO_VERSION=\"1.2.3\"";
let found = Carrier { path: "lib/x.sh".into(), line: 2, shape: carrier_shape(line).unwrap(), text: line.into() };
assert_eq!(found.shape, "an assignment to a version name");Fields§
§path: StringRepository-relative path.
line: usizeOne-based line number.
shape: &'static strThe shape the version was written in.
text: StringThe line, trimmed.
Trait Implementations§
impl Eq for Carrier
impl StructuralPartialEq for Carrier
Auto Trait Implementations§
impl Freeze for Carrier
impl RefUnwindSafe for Carrier
impl Send for Carrier
impl Sync for Carrier
impl Unpin for Carrier
impl UnsafeUnpin for Carrier
impl UnwindSafe for Carrier
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.