Struct text_editor::WorkTree [−][src]
pub struct WorkTree { /* fields omitted */ }
Implementations
impl WorkTree
[src]
impl WorkTree
[src]pub fn new<G: 'static + GitProvider>(
replica_id: ReplicaId,
git: Rc<G>
) -> WorkTree
[src]
replica_id: ReplicaId,
git: Rc<G>
) -> WorkTree
pub async fn reset(&self, head: [u8; 20]) -> Result<Vec<Operation>, Error>
[src]
pub async fn apply_ops<I>(&self, ops: I) -> Result<Vec<Operation>, Error> where
I: IntoIterator<Item = Operation> + 'static,
[src]
I: IntoIterator<Item = Operation> + 'static,
pub fn version(&self) -> Global
[src]
pub fn with_cursor<F>(&self, f: F) where
F: FnMut(&mut Cursor<'_>),
[src]
F: FnMut(&mut Cursor<'_>),
pub fn new_text_file(&self) -> (FileId, Operation)
[src]
pub fn create_dir<P>(&self, path: P) -> Result<(FileId, Operation), Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn create_file<P>(
&self,
path: P,
file_type: FileType
) -> Result<Operation, Error> where
P: AsRef<Path>,
[src]
&self,
path: P,
file_type: FileType
) -> Result<Operation, Error> where
P: AsRef<Path>,
pub async fn open_text_file<P>(&self, path: P) -> Result<BufferId, Error> where
P: Into<PathBuf>,
[src]
P: Into<PathBuf>,
pub fn rename<P1, P2>(
&self,
old_path: P1,
new_path: P2
) -> Result<Operation, Error> where
P1: AsRef<Path>,
P2: AsRef<Path>,
[src]
&self,
old_path: P1,
new_path: P2
) -> Result<Operation, Error> where
P1: AsRef<Path>,
P2: AsRef<Path>,
pub fn remove<P>(&self, path: P) -> Result<Operation, Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn edit<I, T>(
&self,
buffer_id: BufferId,
old_ranges: I,
new_text: T
) -> Result<Operation, Error> where
I: IntoIterator<Item = Range<usize>>,
T: Into<Text>,
[src]
&self,
buffer_id: BufferId,
old_ranges: I,
new_text: T
) -> Result<Operation, Error> where
I: IntoIterator<Item = Range<usize>>,
T: Into<Text>,
pub fn edit_2d<I, T>(
&self,
buffer_id: BufferId,
old_ranges: I,
new_text: T
) -> Result<Operation, Error> where
I: IntoIterator<Item = Range<Point>>,
T: Into<Text>,
[src]
&self,
buffer_id: BufferId,
old_ranges: I,
new_text: T
) -> Result<Operation, Error> where
I: IntoIterator<Item = Range<Point>>,
T: Into<Text>,
pub fn path(&self, buffer_id: BufferId) -> Option<PathBuf>
[src]
pub fn text(&self, buffer_id: BufferId) -> Result<Iter, Error>
[src]
pub fn changes_since(
&self,
buffer_id: BufferId,
version: Global
) -> Result<impl Iterator<Item = Change>, Error>
[src]
&self,
buffer_id: BufferId,
version: Global
) -> Result<impl Iterator<Item = Change>, Error>
pub fn exists<P>(&self, path: P) -> bool where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn head(&self) -> [u8; 20]
[src]
pub fn epoch_id(&self) -> Lamport
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for WorkTree
impl !Send for WorkTree
impl !Sync for WorkTree
impl Unpin for WorkTree
impl !UnwindSafe for WorkTree
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more