Struct optra::InsertOperation [] [src]

pub struct InsertOperation { /* fields omitted */ }

Represents an operation which inserts data into a file

Methods

impl InsertOperation
[src]

Creates a new InsertOperation that will insert the bytes represented by value in a file at location position

Gets the bytes that will be inserted when this operation is applied

Compress this operation and write to writer. The output can then be expanded back into an equivilent operation using expand_from(). If include_site_id is set to true Then the site id is saved alongside everyhting else. If this is the case, then when expanding a timestamp lookup should not be passed in.

Expand this operation from previously compressed data in reader. The data in reader should have been written using compress_to()

Trait Implementations

impl PartialEq for InsertOperation
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for InsertOperation
[src]

impl Clone for InsertOperation
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Operation for InsertOperation
[src]

Gets the position this operation will be perfomed at

Gets the size change this operation will perform. For insert operations, it's the length of the data they will insert. For delete operations, it's the length of the data they will delete Read more

Gets the current local timestamp of this operation

Sets the local timestamp of this operation

impl Debug for InsertOperation
[src]

Formats the value using the given formatter.