pub struct Buffer {
pub text: Text,
/* private fields */
}Fields§
§text: TextImplementations§
Source§impl Buffer
impl Buffer
pub fn new() -> Self
pub fn open(fs: &impl Fs, path: impl AsRef<Utf8Path>) -> Result<Self>
pub fn save(&mut self, fs: &impl Fs) -> Result<()>
pub fn save_as( &mut self, fs: &impl Fs, path: impl AsRef<Utf8Path>, ) -> Result<()>
pub fn kind(&self) -> &BufferKind
pub fn path(&self) -> Option<&Utf8Path>
pub fn is_modified(&self) -> Option<bool>
pub fn assert_invariants(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
impl UnwindSafe for Buffer
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