MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / add_segment

Method add_segment

rust/src/binary_view.rs:838–840  ·  view source on GitHub ↗

Adds a segment to the view. NOTE: Consider using [BinaryViewExt::begin_bulk_add_segments] and [BinaryViewExt::end_bulk_add_segments] if you plan on adding a number of segments all at once, to avoid unnecessary MemoryMap updates.

(&self, segment: SegmentBuilder)

Source from the content-addressed store, hash-verified

836 /// NOTE: Consider using [BinaryViewExt::begin_bulk_add_segments] and [BinaryViewExt::end_bulk_add_segments]
837 /// if you plan on adding a number of segments all at once, to avoid unnecessary MemoryMap updates.
838 fn add_segment(&self, segment: SegmentBuilder) {
839 segment.create(self.as_ref());
840 }
841
842 // TODO: Replace with BulkModify guard.
843 /// Start adding segments in bulk. Useful for adding large numbers of segments.

Callers 2

initMethod · 0.80

Implementers 1

binary_view.rsrust/src/binary_view.rs

Calls 2

createMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected