[][src]Function newrelic_sys::newrelic_set_segment_parent

pub unsafe extern "C" fn newrelic_set_segment_parent(
    segment: *mut newrelic_segment_t,
    parent: *mut newrelic_segment_t
) -> bool

@brief Set the parent for the given segment.

This function changes the parent for the given segment to another segment. Both segments must exist on the same transaction, and must not have ended.

@param [in] segment The segment to reparent. @param [in] parent The new parent segment. @return True if the segment was successfully reparented; false otherwise.

@warning Do not attempt to use a segment that has had newrelic_end_segment() called on it as a segment or parent: this will result in a use-after-free scenario, and likely a crash.