pub struct BindingsInfo {
pub static_arrays: HashSet<String>,
pub static_types: HashMap<String, String>,
pub bitfield_methods: HashMap<String, HashSet<String>>,
}Expand description
bindings.rs から抽出した codegen 用情報
Fields§
§static_arrays: HashSet<String>配列型の extern static 変数名の集合
static_types: HashMap<String, String>extern static 変数名 → 型文字列(“[T; N]” や “T” 等)
配列の要素型抽出に使う。static_array_element_type も参照。
bitfield_methods: HashMap<String, HashSet<String>>ビットフィールドのメソッド名集合(構造体名 → メソッド名セット)
Implementations§
Source§impl BindingsInfo
impl BindingsInfo
Sourcepub fn from_rust_decl_dict(dict: &RustDeclDict) -> Self
pub fn from_rust_decl_dict(dict: &RustDeclDict) -> Self
RustDeclDict から BindingsInfo を構築
Sourcepub fn static_array_element_type(&self, name: &str) -> Option<String>
pub fn static_array_element_type(&self, name: &str) -> Option<String>
static_arrays に含まれる名前の 配列要素型 を返す。
static_types[name] が "[T; N]" 形式なら T を取り出す。
抽出できなかったら None(呼出側でフォールバック)。
Trait Implementations§
Source§impl Clone for BindingsInfo
impl Clone for BindingsInfo
Source§fn clone(&self) -> BindingsInfo
fn clone(&self) -> BindingsInfo
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 moreSource§impl Debug for BindingsInfo
impl Debug for BindingsInfo
Source§impl Default for BindingsInfo
impl Default for BindingsInfo
Source§fn default() -> BindingsInfo
fn default() -> BindingsInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BindingsInfo
impl RefUnwindSafe for BindingsInfo
impl Send for BindingsInfo
impl Sync for BindingsInfo
impl Unpin for BindingsInfo
impl UnsafeUnpin for BindingsInfo
impl UnwindSafe for BindingsInfo
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