/// Returns the module path in the generated mapping crate to the containers which we generate
/// when writing to CrateTypes::template_file.
- fn generated_container_path() -> &'static str {
+ pub fn generated_container_path() -> &'static str {
"crate::c_types::derived"
}
/// Returns the module path in the generated mapping crate to the container templates, which
self.declared.get(ident)
}
/// Returns true if the object at the given path is mapped as X { inner: *mut origX, .. }.
- fn c_type_has_inner_from_path(&self, full_path: &str) -> bool{
+ pub fn c_type_has_inner_from_path(&self, full_path: &str) -> bool{
self.crate_types.opaques.get(full_path).is_some()
}
pub fn write_rust_type<W: std::io::Write>(&self, w: &mut W, generics: Option<&GenericTypes>, t: &syn::Type) {
match t {
syn::Type::Path(p) => {
- if p.qself.is_some() || p.path.leading_colon.is_some() {
+ if p.qself.is_some() {
unimplemented!();
}
self.write_rust_path(w, generics, &p.path);