pub struct ProjectRecord {
pub slug: String,
pub org: String,
pub name: String,
pub display_name: String,
pub url: String,
pub language: String,
pub category: String,
pub aliases: Vec<String>,
pub topic: String,
pub statements: Vec<ProjectStatement>,
pub localized: Vec<LocalizedProject>,
}Expand description
A single curated project entry from data/seed/projects.lino.
Fields§
§slug: String§org: String§name: String§display_name: String§url: String§language: String§category: String§aliases: Vec<String>§topic: String§statements: Vec<ProjectStatement>§localized: Vec<LocalizedProject>Implementations§
Source§impl ProjectRecord
impl ProjectRecord
Sourcepub fn localized_for(&self, language: &str) -> Option<&LocalizedProject>
pub fn localized_for(&self, language: &str) -> Option<&LocalizedProject>
Pick the localized variant matching language, falling back to the
explicit English variant when one is defined, otherwise None.
Sourcepub fn statements_for(&self, language: &str) -> &[ProjectStatement]
pub fn statements_for(&self, language: &str) -> &[ProjectStatement]
Statements for language — either the localized override (when
present and non-empty) or the default English statements.
Sourcepub fn display_name_for(&self, language: &str) -> &str
pub fn display_name_for(&self, language: &str) -> &str
Localized display name when defined, otherwise the default.
Sourcepub const fn topic_for(&self, language: &str) -> &str
pub const fn topic_for(&self, language: &str) -> &str
Localized topic (1–5 word) label when defined, otherwise the default.
Sourcepub fn matches_alias(&self, term: &str) -> bool
pub fn matches_alias(&self, term: &str) -> bool
Case-insensitive alias match against term. Aliases are normalized
(lowercased, hyphens/underscores -> spaces, whitespace collapsed)
at load time so substring comparison is straightforward.
Trait Implementations§
Source§impl Clone for ProjectRecord
impl Clone for ProjectRecord
Source§fn clone(&self) -> ProjectRecord
fn clone(&self) -> ProjectRecord
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 Freeze for ProjectRecord
impl RefUnwindSafe for ProjectRecord
impl Send for ProjectRecord
impl Sync for ProjectRecord
impl Unpin for ProjectRecord
impl UnsafeUnpin for ProjectRecord
impl UnwindSafe for ProjectRecord
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