pub struct UnifiedMetadata { /* private fields */ }Expand description
Unified metadata combining all sources (Rust builtins + Shape stdlib)
This provides a single API for the LSP to get all function/pattern metadata regardless of whether they’re implemented in Rust or Shape stdlib.
Implementations§
Source§impl UnifiedMetadata
impl UnifiedMetadata
Sourcepub fn all_functions(&self) -> Vec<&FunctionInfo>
pub fn all_functions(&self) -> Vec<&FunctionInfo>
Get all functions from all sources (deduplicated)
Sourcepub fn get_function(&self, name: &str) -> Option<&FunctionInfo>
pub fn get_function(&self, name: &str) -> Option<&FunctionInfo>
Get function by name
Sourcepub fn all_patterns(&self) -> &[PatternInfo]
pub fn all_patterns(&self) -> &[PatternInfo]
Get all patterns from stdlib
Sourcepub fn stdlib_functions(&self) -> &[FunctionInfo]
pub fn stdlib_functions(&self) -> &[FunctionInfo]
Get stdlib functions only
Sourcepub fn rust_builtins(&self) -> &[FunctionInfo]
pub fn rust_builtins(&self) -> &[FunctionInfo]
Get rust builtin functions only
Sourcepub fn get_type_properties(&self, type_name: &str) -> Option<&[PropertyInfo]>
pub fn get_type_properties(&self, type_name: &str) -> Option<&[PropertyInfo]>
Get type properties by type name (case-insensitive)
Sourcepub fn all_types(&self) -> &[TypeMetadataInfo]
pub fn all_types(&self) -> &[TypeMetadataInfo]
Get all type metadata
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnifiedMetadata
impl RefUnwindSafe for UnifiedMetadata
impl Send for UnifiedMetadata
impl Sync for UnifiedMetadata
impl Unpin for UnifiedMetadata
impl UnsafeUnpin for UnifiedMetadata
impl UnwindSafe for UnifiedMetadata
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more