[][src]Struct radicle_surf::vcs::Browser

pub struct Browser<Repo, A, Error> { /* fields omitted */ }

A Browser is a way of rendering a History into a Directory snapshot, and the current History it is viewing.

Methods

impl<Repo, A, Error> Browser<Repo, A, Error>[src]

pub fn get_history(&self) -> History<A> where
    A: Clone
[src]

Get the current History the Browser is viewing.

pub fn set_history(&mut self, history: History<A>)[src]

Set the History the Browser should view.

pub fn get_directory(&self) -> Result<Directory, Error>[src]

Render the Directory for this Browser.

pub fn modify_history<F>(&mut self, f: F) where
    F: Fn(&History<A>) -> History<A>, 
[src]

Modify the History in this Browser.

pub fn view_at<F>(&mut self, default_history: History<A>, f: F) where
    A: Clone,
    F: Fn(&History<A>) -> Option<History<A>>, 
[src]

Change the Browser's view of History by modifying it, or using the default History provided if the operation fails.

Trait Implementations

impl<Repo, A, Error> VCS<A, Error> for Browser<Repo, A, Error> where
    Repo: VCS<A, Error>, 
[src]

type HistoryId = Repo::HistoryId

The way to identify a History.

type ArtefactId = Repo::ArtefactId

The way to identify an artifact.

Auto Trait Implementations

impl<Repo, A, Error> !RefUnwindSafe for Browser<Repo, A, Error>

impl<Repo, A, Error> !Send for Browser<Repo, A, Error>

impl<Repo, A, Error> !Sync for Browser<Repo, A, Error>

impl<Repo, A, Error> Unpin for Browser<Repo, A, Error> where
    A: Unpin,
    Repo: Unpin

impl<Repo, A, Error> !UnwindSafe for Browser<Repo, A, Error>

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.