pub struct CustomBodyId {
pub catalog: String,
pub designation: String,
}Expand description
A structured identifier for a custom body.
Fields§
§catalog: StringA coarse namespace for the body source, such as asteroid or hypothetical.
designation: StringThe designation within the namespace.
Implementations§
Source§impl CustomBodyId
impl CustomBodyId
Sourcepub fn new(catalog: impl Into<String>, designation: impl Into<String>) -> Self
pub fn new(catalog: impl Into<String>, designation: impl Into<String>) -> Self
Creates a new custom body identifier.
Sourcepub fn validate(&self) -> Result<(), CustomDefinitionValidationError>
pub fn validate(&self) -> Result<(), CustomDefinitionValidationError>
Validates the custom body identifier fields.
The catalog and designation must both be non-empty, must not contain
leading or trailing whitespace, and must not contain the : separator
used by the display representation.
Trait Implementations§
Source§impl Clone for CustomBodyId
impl Clone for CustomBodyId
Source§impl Debug for CustomBodyId
impl Debug for CustomBodyId
Source§impl<'de> Deserialize<'de> for CustomBodyId
impl<'de> Deserialize<'de> for CustomBodyId
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 Display for CustomBodyId
impl Display for CustomBodyId
impl Eq for CustomBodyId
Source§impl Hash for CustomBodyId
impl Hash for CustomBodyId
Source§impl PartialEq for CustomBodyId
impl PartialEq for CustomBodyId
Source§impl Serialize for CustomBodyId
impl Serialize for CustomBodyId
impl StructuralPartialEq for CustomBodyId
Auto Trait Implementations§
impl Freeze for CustomBodyId
impl RefUnwindSafe for CustomBodyId
impl Send for CustomBodyId
impl Sync for CustomBodyId
impl Unpin for CustomBodyId
impl UnsafeUnpin for CustomBodyId
impl UnwindSafe for CustomBodyId
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