pub struct PluginMetadataBuilder { /* private fields */ }Expand description
Builder for PluginMetadata. Each call leaks a CString so the
returned pointer is 'static (the value lives for the lifetime of
the plugin, matching the contract).
Use via the #[plugin_metadata] proc-macro attribute on the
export!-annotated module — the macro constructs the builder for
you from attribute arguments.
Implementations§
Source§impl PluginMetadataBuilder
impl PluginMetadataBuilder
pub fn new() -> Self
pub fn name(self, s: impl Into<String>) -> Self
pub fn version(self, s: impl Into<String>) -> Self
pub fn vendor(self, s: impl Into<String>) -> Self
pub fn license(self, s: impl Into<String>) -> Self
pub fn homepage_url(self, s: impl Into<String>) -> Self
pub fn source_url(self, s: impl Into<String>) -> Self
pub fn issue_tracker_url(self, s: impl Into<String>) -> Self
pub fn description(self, s: impl Into<String>) -> Self
Sourcepub fn build(self) -> PluginMetadata
pub fn build(self) -> PluginMetadata
Materialize the metadata. The returned struct holds raw pointers
to 'static-lifetime strings (the CStrings are leaked to match
the plugin contract that the pointer is valid for the plugin’s
lifetime).
Trait Implementations§
Source§impl Default for PluginMetadataBuilder
impl Default for PluginMetadataBuilder
Source§fn default() -> PluginMetadataBuilder
fn default() -> PluginMetadataBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PluginMetadataBuilder
impl RefUnwindSafe for PluginMetadataBuilder
impl Send for PluginMetadataBuilder
impl Sync for PluginMetadataBuilder
impl Unpin for PluginMetadataBuilder
impl UnsafeUnpin for PluginMetadataBuilder
impl UnwindSafe for PluginMetadataBuilder
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