Struct capnpc::codegen::GeneratorContext
source · pub struct GeneratorContext<'a> {
pub request: Reader<'a>,
pub node_map: HashMap<u64, Reader<'a>>,
pub scope_map: HashMap<u64, Vec<String>>,
pub node_parents: HashMap<u64, u64>,
pub capnp_root: String,
}
Fields§
§request: Reader<'a>
§node_map: HashMap<u64, Reader<'a>>
§scope_map: HashMap<u64, Vec<String>>
§node_parents: HashMap<u64, u64>
Map from node ID to the node ID of its parent scope. This is equal to node.scope_id for all nodes except for autogenerated interface Param and Result structs; those have scope_id set to 0. See the comment on paramStructType in schema.capnp.
capnp_root: String
Root path for referencing things in the capnp
crate from the generated code.
Implementations§
source§impl<'a> GeneratorContext<'a>
impl<'a> GeneratorContext<'a>
pub fn new(message: &'a Reader<OwnedSegments>) -> Result<GeneratorContext<'a>>
pub fn get_qualified_module(&self, type_id: u64) -> String
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GeneratorContext<'a>
impl<'a> !Send for GeneratorContext<'a>
impl<'a> !Sync for GeneratorContext<'a>
impl<'a> Unpin for GeneratorContext<'a>
impl<'a> !UnwindSafe for GeneratorContext<'a>
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