pub(super) fn segment_create(&self) -> NodeData<Id> {
        match &self.data {
            NodeData::StringSegment { prev, next, .. } => NodeData::StringSegment {
                prev: *prev,
                next: *next,
                contents: String::new(),
                ids: Vec::new(),
            },
            NodeData::String { end, start, .. } => NodeData::StringSegment {
                prev: *end,
                next: *start,
                contents: String::new(),
                ids: Vec::new(),
            },
            NodeData::ArraySegment { prev, next, .. } => NodeData::ArraySegment {
                prev: *prev,
                next: *next,
                contents: Vec::new(),
                ids: Vec::new(),
            },
            NodeData::Array { end, start, .. } => NodeData::ArraySegment {
                prev: *end,
                next: *start,
                contents: Vec::new(),
                ids: Vec::new(),
            },

            _ => panic!("segment_create called on non-sequence node"),
        }
    }
/// Creates a new, empty NodeData for a segment with the same kind. `prev` and `next` are
/// expected to be overwritten by the calling function.
Creates a new, empty NodeData for a segment with the same kind. `prev` and `next` are
expected to be overwritten by the calling function.
Creates a new empty NodeData for a segment with the same kind . ` prev ` and ` next ` are expected to be overwritten by the calling function .
pub(super) fn segment_create(&self) -> NodeData<Id> {
        match &self.data {
            NodeData::StringSegment { prev, next, .. } => NodeData::StringSegment {
                prev: *prev,
                next: *next,
                contents: String::new(),
                ids: Vec::new(),
            },
            NodeData::String { end, start, .. } => NodeData::StringSegment {
                prev: *end,
                next: *start,
                contents: String::new(),
                ids: Vec::new(),
            },
            NodeData::ArraySegment { prev, next, .. } => NodeData::ArraySegment {
                prev: *prev,
                next: *next,
                contents: Vec::new(),
                ids: Vec::new(),
            },
            NodeData::Array { end, start, .. } => NodeData::ArraySegment {
                prev: *end,
                next: *start,
                contents: Vec::new(),
                ids: Vec::new(),
            },
            _ => panic!("segment_create called on non-sequence node"),
        }
    }
pub ( super ) fn segment_create ( & self ) -> NodeData < Id > { match & self . data { NodeData :: StringSegment { prev , next , .. } => NodeData :: StringSegment { prev : * prev , next : * next , contents : String :: new ( ) , ids : Vec :: new ( ) , } , NodeData :: String { end , start , .. } => NodeData :: StringSegment { prev : * end , next : * start , contents : String :: new ( ) , ids : Vec :: new ( ) , } , NodeData :: ArraySegment { prev , next , .. } => NodeData :: ArraySegment { prev : * prev , next : * next , contents : Vec :: new ( ) , ids : Vec :: new ( ) , } , NodeData :: Array { end , start , .. } => NodeData :: ArraySegment { prev : * end , next : * start , contents : Vec :: new ( ) , ids : Vec :: new ( ) , } , _ => panic ! ( " " ) , } }
Creates a new, empty NodeData for a segment with the same kind.
Creates a new empty NodeData for a segment with the same kind .
&self