pub(super) fn construct_string(&mut self, id: Id) -> Result<(), TreeError> {
        let segment_id = self.next_id();
        let string_id = self.construct_simple(
            id.clone(),
            NodeData::String {
                id,
                start: segment_id,
                end: segment_id,
            },
        )?;
        self.nodes.insert(
            segment_id,
            Node {
                parent: Some(string_id),
                data: NodeData::StringSegment {
                    contents: "".to_string(),
                    ids: vec![],
                    prev: string_id,
                    next: string_id,
                },
            },
        );
        Ok(())
    }
/// Constructs a new empty string within the `Tree`. Newly constructed values have no parent or
/// place in the tree until placed with an `assign` call.
Constructs a new empty string within the `Tree`. Newly constructed values have no parent or
place in the tree until placed with an `assign` call.
Constructs a new empty string within the ` Tree ` . Newly constructed values have no parent or place in the tree until placed with an ` assign ` call .
pub(super) fn construct_string(&mut self, id: Id) -> Result<(), TreeError> {
        let segment_id = self.next_id();
        let string_id = self.construct_simple(
            id.clone(),
            NodeData::String {
                id,
                start: segment_id,
                end: segment_id,
            },
        )?;
        self.nodes.insert(
            segment_id,
            Node {
                parent: Some(string_id),
                data: NodeData::StringSegment {
                    contents: "".to_string(),
                    ids: vec![],
                    prev: string_id,
                    next: string_id,
                },
            },
        );
        Ok(())
    }
pub ( super ) fn construct_string ( & mut self , id : Id ) -> Result < ( ) , TreeError > { let segment_id = self . next_id ( ) ; let string_id = self . construct_simple ( id . clone ( ) , NodeData :: String { id , start : segment_id , end : segment_id , } , ) ? ; self . nodes . insert ( segment_id , Node { parent : Some ( string_id ) , data : NodeData :: StringSegment { contents : " " . to_string ( ) , ids : vec ! [ ] , prev : string_id , next : string_id , } , } , ) ; Ok ( ( ) ) }
Constructs a new empty string within the `Tree`.
Constructs a new empty string within the ` Tree ` .
&mut self
id
Id