You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tui_worker.rs
    path of file: ./repos/joshuto/src/ui/widgets
    
    the code of the file until where you have to start completion: use ratatui::buffer::Buffer;
use ratatui::layout::Rect;
use ratatui::style::{Color, Modifier, Style};
use ratatui::widgets::Widget;

use crate::context::WorkerContext;
use crate::io::{FileOperationProgress, IoWorkerObserver};
use crate::util::format;

pub struct TuiWorker<'a> {
    pub context: &'a WorkerContext,
}

impl<'a> TuiWorker<'a> {
    pub fn new(context: &'a WorkerContext) -> Self {
        Self { context }
    }
}

impl<'a> Widget for TuiWorker<'a> {
    fn render(self, area: Rect, buf: &mut Buffer) {
        if area.height < 7 {
            return;
        }
        match self.context.worker_ref() {
            Some(io_obs) => {
                if let Some(progress) = io_obs.progress.as_ref() {
                    let current_area = Rect {
                        y: area.y + 1,
                        ..area
                    };
                    TuiCurrentWorker::new(io_obs, progress).render(current_area, buf);
                }

               
    
    fn render(self, area: Rect, buf: &mut Buffer) {
        if area.height < 7 {
            return;
        }
        match self.context.worker_ref() {
            Some(io_obs) => {
                if let Some(progress) = io_obs.progress.as_ref() {
                    let current_area = Rect {
                        y: area.y + 1,
                        ..area
                    };
                    TuiCurrentWorker::new(io_obs, progress).render(current_area, buf);
                }

                // draw queued up work
                let style = Style::default()
                    .fg(Color::Yellow)
                    .add_modifier(Modifier::BOLD);
                buf.set_stringn(0, 6, "Queue:", area.width as usize, style);

                let queue_area = Rect {
                    y: area.y + 7,
                    ..area
                };
                TuiWorkerQueue::new(self.context).render(queue_area, buf);
            }
            _ => {
                let style = Style::default();
                buf.set_stringn(0, 2, "No operations running", area.width as usize, style);
                let style = Style::default()
                    .fg(Color::Yellow)
                    .add_modifier(Modifier::BOLD);
                buf.set_stringn(0, 4, "Queue:", area.width as usize, style);
            }
        }
    }