Skip to main content

ConstantSource

Trait ConstantSource 

Source
pub trait ConstantSource {
    // Required method
    fn definition(&self, qualified_name: &str) -> Option<&Definition>;

    // Provided methods
    fn local_constant(&self, _binding: BindingId) -> Option<Constant> { ... }
    fn named_constant(&self, qualified_name: &str) -> Option<Value> { ... }
    fn underlying_kind(&self, ty: &Type) -> Option<SimpleKind> { ... }
    fn array_length(&self, ty: &Type) -> Option<u64> { ... }
    fn is_newtype(&self, qualified_name: &str) -> bool { ... }
}

Required Methods§

Source

fn definition(&self, qualified_name: &str) -> Option<&Definition>

Provided Methods§

Source

fn local_constant(&self, _binding: BindingId) -> Option<Constant>

Source

fn named_constant(&self, qualified_name: &str) -> Option<Value>

Source

fn underlying_kind(&self, ty: &Type) -> Option<SimpleKind>

Source

fn array_length(&self, ty: &Type) -> Option<u64>

Source

fn is_newtype(&self, qualified_name: &str) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§