pub struct SourceMetadataExport<'a> {
pub package: &'a str,
pub component: &'a str,
pub executable: Option<&'a str>,
pub exported_symbol: Option<&'a str>,
pub package_manifest: &'a str,
pub source_artifacts: &'a [&'a str],
pub language: &'a str,
}Expand description
Source metadata document settings used by the std JSON emitter.
Fields§
§package: &'a str§component: &'a str§executable: Option<&'a str>§exported_symbol: Option<&'a str>§package_manifest: &'a str§source_artifacts: &'a [&'a str]§language: &'a strphase-308 — the source language the sidecar describes ("rust",
"c", "cpp"). It was a hardcoded "rust" literal in the serializer
while Rust was the only producer; the C/C++ producer reaches this SAME
serializer, so the value has to come from the caller. The consumption
side keys on (package, executable) and never branches on it, but the
schema declares it and a wrong value is a lie in the artifact.
Implementations§
Source§impl<'a> SourceMetadataExport<'a>
impl<'a> SourceMetadataExport<'a>
Sourcepub const fn new(package: &'a str, component: &'a str) -> Self
pub const fn new(package: &'a str, component: &'a str) -> Self
Create export settings with ROS package and component names.
Sourcepub const fn language(self, language: &'a str) -> Self
pub const fn language(self, language: &'a str) -> Self
Set the source language ("c" / "cpp"; defaults to "rust").
Sourcepub const fn executable(self, executable: &'a str) -> Self
pub const fn executable(self, executable: &'a str) -> Self
Set executable name.
Sourcepub const fn exported_symbol(self, exported_symbol: &'a str) -> Self
pub const fn exported_symbol(self, exported_symbol: &'a str) -> Self
Set exported symbol name.
Sourcepub const fn package_manifest(self, package_manifest: &'a str) -> Self
pub const fn package_manifest(self, package_manifest: &'a str) -> Self
Set package manifest path.
Sourcepub const fn source_artifacts(self, source_artifacts: &'a [&'a str]) -> Self
pub const fn source_artifacts(self, source_artifacts: &'a [&'a str]) -> Self
Set source artifact paths.
Trait Implementations§
Source§impl<'a> Clone for SourceMetadataExport<'a>
impl<'a> Clone for SourceMetadataExport<'a>
Source§fn clone(&self) -> SourceMetadataExport<'a>
fn clone(&self) -> SourceMetadataExport<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for SourceMetadataExport<'a>
impl<'a> RefUnwindSafe for SourceMetadataExport<'a>
impl<'a> Send for SourceMetadataExport<'a>
impl<'a> Sync for SourceMetadataExport<'a>
impl<'a> Unpin for SourceMetadataExport<'a>
impl<'a> UnsafeUnpin for SourceMetadataExport<'a>
impl<'a> UnwindSafe for SourceMetadataExport<'a>
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