[−][src]Struct radicle_surf::vcs::Browser
A Browser
is a way of rendering a History
into a
Directory
snapshot, and the current History
it is
viewing.
Methods
impl<'browser, Repo, A, Error> Browser<'browser, Repo, A, Error>
[src]
pub fn get_history(&self) -> History<A> where
A: Clone,
[src]
A: Clone,
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]
F: Fn(&History<A>) -> History<A>,
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]
A: Clone,
F: Fn(&History<A>) -> Option<History<A>>,
Change the Browser
's view of History
by modifying it, or
using the default History
provided if the operation fails.
Trait Implementations
impl<'browser, Repo, A, Error> VCS<'browser, A, Error> for Browser<'browser, Repo, A, Error> where
A: 'browser,
Error: 'browser,
Repo: VCS<'browser, A, Error>,
[src]
A: 'browser,
Error: 'browser,
Repo: VCS<'browser, A, Error>,
type HistoryId = Repo::HistoryId
The way to identify a History.
type ArtefactId = Repo::ArtefactId
The way to identify an artifact.
fn get_history(
&'browser self,
identifier: Self::HistoryId
) -> Result<History<A>, Error>
[src]
&'browser self,
identifier: Self::HistoryId
) -> Result<History<A>, Error>
fn get_histories(&'browser self) -> Result<Vec<History<A>>, Error>
[src]
fn get_identifier(artifact: &'browser A) -> Self::ArtefactId
[src]
Auto Trait Implementations
impl<'browser, Repo, A, Error> !RefUnwindSafe for Browser<'browser, Repo, A, Error>
impl<'browser, Repo, A, Error> !Send for Browser<'browser, Repo, A, Error>
impl<'browser, Repo, A, Error> !Sync for Browser<'browser, Repo, A, Error>
impl<'browser, Repo, A, Error> Unpin for Browser<'browser, Repo, A, Error> where
A: Unpin,
A: Unpin,
impl<'browser, Repo, A, Error> !UnwindSafe for Browser<'browser, Repo, A, Error>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,