[][src]Struct tab_api::chunk::OutputChunk

pub struct OutputChunk {
    pub index: usize,
    pub data: Vec<u8>,
}

Serializes an indexed chunk of stdout Send by a single running PTY process.

Fields

index: usize

The message index, generated by the PTY process.

data: Vec<u8>

Raw bytes of stdout

Implementations

impl OutputChunk[src]

pub fn len(&self) -> usize[src]

The data buffer length

pub fn contains(&self, index: usize) -> bool[src]

Returns true if this chunk's data contains the given index

pub fn is_before(&self, index: usize) -> bool[src]

Returns true if this chunk's data ends before the given index

pub fn truncate_before(&mut self, index: usize)[src]

Truncates the current output chunk, removing all data that is before the given index

pub fn start(&self) -> usize[src]

The byte index at which this buffer starts (inclusive)

pub fn end(&self) -> usize[src]

The byte index at which this buffer ends (exclusive)

Trait Implementations

impl Clone for OutputChunk[src]

impl Debug for OutputChunk[src]

impl<'de> Deserialize<'de> for OutputChunk[src]

impl Eq for OutputChunk[src]

impl PartialEq<OutputChunk> for OutputChunk[src]

impl Serialize for OutputChunk[src]

impl StructuralEq for OutputChunk[src]

impl StructuralPartialEq for OutputChunk[src]

impl ToString for OutputChunk[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Task for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.