Enum streampager::control::Change[][src]

pub enum Change {
    SetTitle {
        title: String,
    },
    SetInfo {
        info: String,
    },
    AppendLine {
        content: Vec<u8>,
    },
    InsertLine {
        before_index: usize,
        content: Vec<u8>,
    },
    ReplaceLine {
        index: usize,
        content: Vec<u8>,
    },
    DeleteLine {
        index: usize,
    },
    AppendLines {
        contents: Vec<Vec<u8>>,
    },
    InsertLines {
        before_index: usize,
        contents: Vec<Vec<u8>>,
    },
    ReplaceLines {
        range: Range<usize>,
        contents: Vec<Vec<u8>>,
    },
    DeleteLines {
        range: Range<usize>,
    },
    ReplaceAll {
        contents: Vec<Vec<u8>>,
    },
}

A change to apply to a controlled file.

Variants

SetTitle

Set the title for the file.

Fields of SetTitle

title: String

The new title.

SetInfo

Set the file information for the file.

Fields of SetInfo

info: String

The text of the new file info.

AppendLine

Append a single line to the file.

Fields of AppendLine

content: Vec<u8>

The content of the new line.

InsertLine

Insert a single line into the file.

Fields of InsertLine

before_index: usize

Index of the line in the file to insert before.

content: Vec<u8>

The content of the new line.

ReplaceLine

Replace a single line in the file.

Fields of ReplaceLine

index: usize

Index of the line in fhe file to replace.

content: Vec<u8>

The content of the new line.

DeleteLine

Delete a single line from the file.

Fields of DeleteLine

index: usize

Index of the line in the file to delete.

AppendLines

Append multiple lines to the file

Fields of AppendLines

contents: Vec<Vec<u8>>

The contents of the new lines.

InsertLines

Insert some lines before another line in the file.

Fields of InsertLines

before_index: usize

Index of the line in the file to insert before.

contents: Vec<Vec<u8>>

The contents of the new lines.

ReplaceLines

Replace a range of lines with another set of lines. The range and the new lines do not need to be the same size.

Fields of ReplaceLines

range: Range<usize>

The range of lines in the file to replace.

contents: Vec<Vec<u8>>

The contents of the new lines.

DeleteLines

Delete a range of lines in the file.

Fields of DeleteLines

range: Range<usize>

The range of lines in the file to delete.

ReplaceAll

Replace all lines with another set of lines.

Fields of ReplaceAll

contents: Vec<Vec<u8>>

The new contents of the file.

Auto Trait Implementations

impl RefUnwindSafe for Change

impl Send for Change

impl Sync for Change

impl Unpin for Change

impl UnwindSafe for Change

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> From<T> for T[src]

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

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,