use ratatui::widgets::Block;
use std::ops::{Deref, DerefMut};
#[derive(Default, Clone, Debug)]
pub struct SendBlock(pub Option<Block<'static>>);
unsafe impl Send for SendBlock {}
unsafe impl Sync for SendBlock {}
impl Deref for SendBlock {
type Target = Option<Block<'static>>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl DerefMut for SendBlock {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<Block<'static>> for SendBlock {
fn from(block: Block<'static>) -> Self {
Self(Some(block))
}
}
impl From<Option<Block<'static>>> for SendBlock {
fn from(block: Option<Block<'static>>) -> Self {
Self(block)
}
}