pub struct RegisterContent {
pub text: String,
pub yank_type: YankType,
}Expand description
Content stored in a register.
Combines the yanked text with its yank type for proper paste behavior.
Fields§
§text: StringThe yanked text.
yank_type: YankTypeHow the text was yanked (affects paste behavior).
Implementations§
Source§impl RegisterContent
impl RegisterContent
Sourcepub fn new(text: impl Into<String>, yank_type: YankType) -> Self
pub fn new(text: impl Into<String>, yank_type: YankType) -> Self
Create new register content with specified yank type.
Sourcepub fn characterwise(text: impl Into<String>) -> Self
pub fn characterwise(text: impl Into<String>) -> Self
Create characterwise register content.
Sourcepub const fn is_characterwise(&self) -> bool
pub const fn is_characterwise(&self) -> bool
Check if content is characterwise.
Sourcepub const fn is_linewise(&self) -> bool
pub const fn is_linewise(&self) -> bool
Check if content is linewise.
Trait Implementations§
Source§impl Clone for RegisterContent
impl Clone for RegisterContent
Source§fn clone(&self) -> RegisterContent
fn clone(&self) -> RegisterContent
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 RegisterContent
impl Debug for RegisterContent
Source§impl Default for RegisterContent
impl Default for RegisterContent
Source§impl PartialEq for RegisterContent
impl PartialEq for RegisterContent
impl Eq for RegisterContent
impl StructuralPartialEq for RegisterContent
Auto Trait Implementations§
impl Freeze for RegisterContent
impl RefUnwindSafe for RegisterContent
impl Send for RegisterContent
impl Sync for RegisterContent
impl Unpin for RegisterContent
impl UnsafeUnpin for RegisterContent
impl UnwindSafe for RegisterContent
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