#[non_exhaustive]pub struct MarketplaceIdentity<'a> {
pub name: &'a str,
pub plugin_name: &'a str,
pub display_name: &'a str,
}Expand description
The two names a marketplace manifest carries, plus the display string the app shows for the source.
#[non_exhaustive] for the reason super::HookPluginIdentity is; build
one with MarketplaceIdentity::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: &'a strThe marketplace name. Codex keys a registered source on it, so two
consumers choosing the same name collide on one machine — see
MarketplaceOutcome::Replaced.
plugin_name: &'a strThe offered plugin’s name, which must equal the name in the plugin
manifest rendered by super::render_plugin_manifest.
display_name: &'a strDisplay name for the source in the app’s marketplace list.
Implementations§
Source§impl<'a> MarketplaceIdentity<'a>
impl<'a> MarketplaceIdentity<'a>
Sourcepub const fn new(name: &'a str, plugin_name: &'a str) -> Self
pub const fn new(name: &'a str, plugin_name: &'a str) -> Self
A marketplace offering exactly plugin_name, displayed under name
until Self::with_display_name says otherwise.
Sourcepub const fn with_display_name(self, display_name: &'a str) -> Self
pub const fn with_display_name(self, display_name: &'a str) -> Self
Set the display name shown for the source.
Trait Implementations§
Source§impl<'a> Clone for MarketplaceIdentity<'a>
impl<'a> Clone for MarketplaceIdentity<'a>
Source§fn clone(&self) -> MarketplaceIdentity<'a>
fn clone(&self) -> MarketplaceIdentity<'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 moreimpl<'a> Copy for MarketplaceIdentity<'a>
Source§impl<'a> Debug for MarketplaceIdentity<'a>
impl<'a> Debug for MarketplaceIdentity<'a>
impl<'a> Eq for MarketplaceIdentity<'a>
Source§impl<'a> PartialEq for MarketplaceIdentity<'a>
impl<'a> PartialEq for MarketplaceIdentity<'a>
impl<'a> StructuralPartialEq for MarketplaceIdentity<'a>
Auto Trait Implementations§
impl<'a> Freeze for MarketplaceIdentity<'a>
impl<'a> RefUnwindSafe for MarketplaceIdentity<'a>
impl<'a> Send for MarketplaceIdentity<'a>
impl<'a> Sync for MarketplaceIdentity<'a>
impl<'a> Unpin for MarketplaceIdentity<'a>
impl<'a> UnsafeUnpin for MarketplaceIdentity<'a>
impl<'a> UnwindSafe for MarketplaceIdentity<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.