pub fn new_segment(&mut self, name: &str, value: &str) -> &mut Segment {
        let mut segment = Segment::new(name);
        segment.set_style(self.style);
        // Use the provided value unless overwritten by config
        segment.set_value(self.config_value_str(name).unwrap_or(value));
        self.segments.push(segment);

        self.segments.last_mut().unwrap()
    }
/// Get a reference to a newly created segment in the module
Get a reference to a newly created segment in the module
Get a reference to a newly created segment in the module
pub fn new_segment(&mut self, name: &str, value: &str) -> &mut Segment {
        let mut segment = Segment::new(name);
        segment.set_style(self.style);
        // Use the provided value unless overwritten by config
        segment.set_value(self.config_value_str(name).unwrap_or(value));
        self.segments.push(segment);
        self.segments.last_mut().unwrap()
    }
pub fn new_segment ( & mut self , name : & str , value : & str ) -> & mut Segment { let mut segment = Segment :: new ( name ) ; segment . set_style ( self . style ) ; // Use the provided value unless overwritten by config segment . set_value ( self . config_value_str ( name ) . unwrap_or ( value ) ) ; self . segments . push ( segment ) ; self . segments . last_mut ( ) . unwrap ( ) }
Get a reference to a newly created segment in the module
Get a reference to a newly created segment in the module
&mut self
name
&str
value
&str