pub struct ItemsBuilder { /* private fields */ }
Expand description
Build up a a set of Items
.
Implementations§
Source§impl ItemsBuilder
impl ItemsBuilder
Sourcepub fn new(size: u32) -> ItemsBuilder
pub fn new(size: u32) -> ItemsBuilder
Construct a new builder, with the given size.
Sourcepub fn add_item(&mut self, item: Item) -> Id
pub fn add_item(&mut self, item: Item) -> Id
Add the given item to to the graph and return the Id
that it was
assigned.
Sourcepub fn add_root(&mut self, item: Item) -> Id
pub fn add_root(&mut self, item: Item) -> Id
Add the given item to the graph as a root and return the Id
that it
was assigned.
Sourcepub fn add_edge(&mut self, from: Id, to: Id)
pub fn add_edge(&mut self, from: Id, to: Id)
Add an edge between the given keys that have already been parsed into items.
Sourcepub fn link_data(&mut self, offset: i64, len: usize, id: Id)
pub fn link_data(&mut self, offset: i64, len: usize, id: Id)
Add a range of static data and the Id
that defines it.
Sourcepub fn get_data(&self, offset: u32) -> Option<Id>
pub fn get_data(&self, offset: u32) -> Option<Id>
Locate the data section defining memory at the given offset.
Sourcepub fn size_added(&self) -> u32
pub fn size_added(&self) -> u32
Return the size of all added items so far
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ItemsBuilder
impl RefUnwindSafe for ItemsBuilder
impl Send for ItemsBuilder
impl Sync for ItemsBuilder
impl Unpin for ItemsBuilder
impl UnwindSafe for ItemsBuilder
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