pub struct StagedOperation {
pub selector: Selector,
pub content: String,
pub file_path: PathBuf,
pub language_name: LanguageName,
pub edit_position: Option<EditPosition>,
}
Expand description
Represents a staged operation that can be previewed and committed
Fields§
§selector: Selector
§content: String
§file_path: PathBuf
§language_name: LanguageName
§edit_position: Option<EditPosition>
Implementations§
Source§impl StagedOperation
impl StagedOperation
pub fn selector(&self) -> &Selector
pub fn selector_mut(&mut self) -> &mut Selector
pub fn set_selector(&mut self, selector: Selector) -> &mut Self
pub fn with_selector(self, selector: Selector) -> Self
pub fn content(&self) -> &str
pub fn content_mut(&mut self) -> &mut str
pub fn set_content(&mut self, content: String) -> &mut Self
pub fn with_content(self, content: String) -> Self
pub fn file_path(&self) -> &Path
pub fn file_path_mut(&mut self) -> &mut Path
pub fn set_file_path(&mut self, file_path: PathBuf) -> &mut Self
pub fn with_file_path(self, file_path: PathBuf) -> Self
pub fn language_name(&self) -> &LanguageName
pub fn language_name_mut(&mut self) -> &mut LanguageName
pub fn set_language_name(&mut self, language_name: LanguageName) -> &mut Self
pub fn with_language_name(self, language_name: LanguageName) -> Self
pub fn edit_position(&self) -> Option<&EditPosition>
pub fn edit_position_mut(&mut self) -> Option<&mut EditPosition>
pub fn set_edit_position( &mut self, edit_position: Option<EditPosition>, ) -> &mut Self
pub fn with_edit_position(self, edit_position: Option<EditPosition>) -> Self
Trait Implementations§
Source§impl Clone for StagedOperation
impl Clone for StagedOperation
Source§fn clone(&self) -> StagedOperation
fn clone(&self) -> StagedOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StagedOperation
impl Debug for StagedOperation
Source§impl<'de> Deserialize<'de> for StagedOperation
impl<'de> Deserialize<'de> for StagedOperation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Editor<'_>> for StagedOperation
impl From<Editor<'_>> for StagedOperation
Auto Trait Implementations§
impl Freeze for StagedOperation
impl RefUnwindSafe for StagedOperation
impl Send for StagedOperation
impl Sync for StagedOperation
impl Unpin for StagedOperation
impl UnwindSafe for StagedOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more