#[non_exhaustive]pub struct Source {
pub format: SourceFormat,
pub sha256: String,
pub airframe_not_as_written: Option<String>,
}Expand description
The file a design was read from: its format and its SHA-256, which name it without its path, and whether its rocket was read exactly as written.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.format: SourceFormatThe file’s format.
sha256: StringThe SHA-256 of the file’s bytes, as 64 lowercase hexadecimal digits.
airframe_not_as_written: Option<String>Why the file’s airframe or a motor mount was not read exactly as written, if it wasn’t: a
part left out, a value dropped or simplified, or something assumed
(hpr_io::ork::airframe_not_as_written). No configuration of such a rocket flies, and
hpr sim flies no other motor in it. Absent when the rocket was read as written. A document
migrated from 0.1 that doesn’t show which holds exactly migrate::UNKNOWN, a fixed text a
program can compare against.
Implementations§
Source§impl Source
impl Source
Sourcepub fn of(format: SourceFormat, bytes: &[u8]) -> Self
pub fn of(format: SourceFormat, bytes: &[u8]) -> Self
The source bytes of format, its rocket read as written; set
Source::airframe_not_as_written when it wasn’t.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
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>,
impl Eq for Source
Source§impl JsonSchema for Source
impl JsonSchema for Source
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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
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
§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
key and return true if they are equal.