vala 0.1.0

Safe Rust bindings to libvala, the Vala compiler library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Curated methods on [`Symbol`], the base of every named declaration.

use vala_sys as ffi;

use crate::object::{opt_string, RawWrapper};
use crate::Symbol;

impl Symbol {
    /// The symbol's declared name, or `None` for anonymous symbols (such as the
    /// global root namespace).
    pub fn name(&self) -> Option<String> {
        unsafe { opt_string(ffi::vala_symbol_get_name(self.as_raw())) }
    }
}