pub struct GitStatusDisplay<'a, 's> {
    pub width: usize,
    /* private fields */
}

Fields§

§width: usize

Implementations§

Examples found in repository?
src/display/displayable_tree.rs (lines 413-417)
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
    pub fn write_root_line<'w, W: Write>(
        &self,
        cw: &mut CropWriter<'w, W>,
        selected: bool,
    ) -> Result<(), ProgramError> {
        cond_bg!(style, self, selected, self.skin.directory);
        let line = &self.tree.lines[0];
        if self.tree.options.show_sizes {
            if let Some(s) = line.sum {
                cw.queue_g_string(
                    style,
                    format!("{:>4} ", file_size::fit_4(s.to_size())),
                )?;
            }
        }
        let title = line.path.to_string_lossy();
        cw.queue_str(style, &title)?;
        if self.in_app && !cw.is_full() {
            if let ComputationResult::Done(git_status) = &self.tree.git_status {
                let git_status_display = GitStatusDisplay::from(
                    git_status,
                    self.skin,
                    cw.allowed,
                );
                git_status_display.write(cw, selected)?;
            }
            #[cfg(unix)]
            if self.tree.options.show_root_fs {
                if let Some(mount) = line.mount() {
                    let fs_space_display = crate::filesystems::MountSpaceDisplay::from(
                        &mount,
                        self.skin,
                        cw.allowed,
                    );
                    fs_space_display.write(cw, selected)?;
                }
            }
            self.extend_line_bg(cw, selected)?;
        }
        Ok(())
    }
Examples found in repository?
src/display/displayable_tree.rs (line 418)
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
    pub fn write_root_line<'w, W: Write>(
        &self,
        cw: &mut CropWriter<'w, W>,
        selected: bool,
    ) -> Result<(), ProgramError> {
        cond_bg!(style, self, selected, self.skin.directory);
        let line = &self.tree.lines[0];
        if self.tree.options.show_sizes {
            if let Some(s) = line.sum {
                cw.queue_g_string(
                    style,
                    format!("{:>4} ", file_size::fit_4(s.to_size())),
                )?;
            }
        }
        let title = line.path.to_string_lossy();
        cw.queue_str(style, &title)?;
        if self.in_app && !cw.is_full() {
            if let ComputationResult::Done(git_status) = &self.tree.git_status {
                let git_status_display = GitStatusDisplay::from(
                    git_status,
                    self.skin,
                    cw.allowed,
                );
                git_status_display.write(cw, selected)?;
            }
            #[cfg(unix)]
            if self.tree.options.show_root_fs {
                if let Some(mount) = line.mount() {
                    let fs_space_display = crate::filesystems::MountSpaceDisplay::from(
                        &mount,
                        self.skin,
                        cw.allowed,
                    );
                    fs_space_display.write(cw, selected)?;
                }
            }
            self.extend_line_bg(cw, selected)?;
        }
        Ok(())
    }

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.