[][src]Struct nvimpam_lib::folds::FoldList

pub struct FoldList { /* fields omitted */ }

Holds the fold data of the buffer. A fold has the following data: Linenumbers start, end (indexed from 0), and a Keyword.

Methods

impl FoldList
[src]

Create a new FoldList. There does not seem to be a way to create one with a predetermined capacity.

Clear FoldList, by clearing the BTreeMap's individually

Insert a level 1 fold ([start, end], Keyword) into the FoldList. If end < start, we silently return. Otherwise, we call the internal insert function that returns an error if the fold is already in the list. In that case, it needs to be removed beforehand.

Remove a level 1 fold [start, end] from the foldlist. Only checks if the fold is in the FoldList, and returns an error otherwise.

Remove all the entries from the FoldList, and iterate over lines to populate it with new ones. Then recreate the level 2 folds.

Delete all folds in nvim, and create the ones from the FoldList.

Copy the elements of a FoldList of the given level into a Vec, containing the tuples (start, end, Keyword)

Parse an array of Option<Keyword>s into a FoldList. The foldlist is cleared as a first step.

Creates only level 1 folds. Depending on the ownfold parameter in the definition of the card in the carddata module, each card will be in an own fold, or several adjacent (modulo comments) cards will be subsumed into a fold.

Trait Implementations

impl Default for FoldList
[src]

Returns the "default value" for a type. Read more

impl Debug for FoldList
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for FoldList

impl Sync for FoldList

Blanket Implementations

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more