pub struct RecordedSpelling {
pub spelling: Spelling,
pub writer: String,
pub value: String,
}Expand description
One store’s spelling of one subject. Which half of the layer wrote it, what wrote it, and the value it would have here.
use majordomus_cli::session::{RecordedSpelling, Spelling};
let local = RecordedSpelling {
spelling: Spelling::Local,
writer: "mj_git_repo_id (lib/common.sh)".into(),
value: "/src/repo/.git".into(),
};
// knowing which half a string came from is what stops a path being compared with a URL
assert_eq!(local.spelling.as_str(), "local");
assert!(local.value.starts_with('/'));Fields§
§spelling: SpellingWhich half of the layer wrote it.
writer: StringThe writer, named so a reader can go and look at it.
value: StringThe value, as this checkout would have it written. Empty when nothing has written one here yet, which is a fresh clone and not a fault.
Trait Implementations§
Source§impl Clone for RecordedSpelling
impl Clone for RecordedSpelling
Source§fn clone(&self) -> RecordedSpelling
fn clone(&self) -> RecordedSpelling
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RecordedSpelling
impl Debug for RecordedSpelling
Source§impl<'de> Deserialize<'de> for RecordedSpelling
impl<'de> Deserialize<'de> for RecordedSpelling
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
impl Eq for RecordedSpelling
Source§impl JsonSchema for RecordedSpelling
impl JsonSchema for RecordedSpelling
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ordered for RecordedSpelling
impl Ordered for RecordedSpelling
Source§impl PartialEq for RecordedSpelling
impl PartialEq for RecordedSpelling
Source§fn eq(&self, other: &RecordedSpelling) -> bool
fn eq(&self, other: &RecordedSpelling) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RecordedSpelling
impl Serialize for RecordedSpelling
impl StructuralPartialEq for RecordedSpelling
Auto Trait Implementations§
impl Freeze for RecordedSpelling
impl RefUnwindSafe for RecordedSpelling
impl Send for RecordedSpelling
impl Sync for RecordedSpelling
impl Unpin for RecordedSpelling
impl UnsafeUnpin for RecordedSpelling
impl UnwindSafe for RecordedSpelling
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.