pub struct Tab<S> {
pub id: String,
/* private fields */
}Expand description
A handle to an iTerm2 tab.
Fields§
§id: StringThe unique tab identifier.
Implementations§
Source§impl<S: AsyncRead + AsyncWrite + Unpin + Send + 'static> Tab<S>
impl<S: AsyncRead + AsyncWrite + Unpin + Send + 'static> Tab<S>
Sourcepub fn new(id: String, conn: Arc<Connection<S>>) -> Result<Self>
pub fn new(id: String, conn: Arc<Connection<S>>) -> Result<Self>
Create a tab handle. Validates the tab ID.
Sourcepub async fn close(&self, force: bool) -> Result<()>
pub async fn close(&self, force: bool) -> Result<()>
Close this tab. If force is true, skip the confirmation prompt.
Sourcepub async fn get_variable(&self, name: &str) -> Result<Option<String>>
pub async fn get_variable(&self, name: &str) -> Result<Option<String>>
Get a tab variable by name. Returns JSON-encoded value.
Sourcepub fn connection(&self) -> &Connection<S>
pub fn connection(&self) -> &Connection<S>
Get a reference to the underlying connection.
Auto Trait Implementations§
impl<S> Freeze for Tab<S>
impl<S> !RefUnwindSafe for Tab<S>
impl<S> Send for Tab<S>where
S: Send,
impl<S> Sync for Tab<S>where
S: Send,
impl<S> Unpin for Tab<S>
impl<S> UnsafeUnpin for Tab<S>
impl<S> !UnwindSafe for Tab<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more