pub enum Scope {
Nothing,
Buffer,
Window,
Tabpage,
Global,
Local,
Script,
FunctionArg,
Vim,
}
Expand description
Represents a vim variable scope
Variants
Nothing
Buffer
Window
Tabpage
Global
Local
Script
FunctionArg
Vim
Implementations
sourceimpl Scope
impl Scope
sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Converts to a str representing scope
Examples
use vimvar::Scope;
assert_eq!(Scope::Nothing.as_str(), "");
assert_eq!(Scope::Buffer.as_str(), "b:");
assert_eq!(Scope::Window.as_str(), "w:");
assert_eq!(Scope::Tabpage.as_str(), "t:");
assert_eq!(Scope::Global.as_str(), "g:");
assert_eq!(Scope::Local.as_str(), "l:");
assert_eq!(Scope::Script.as_str(), "s:");
assert_eq!(Scope::FunctionArg.as_str(), "a:");
assert_eq!(Scope::Vim.as_str(), "v:");
Trait Implementations
sourceimpl Display for Scope
impl Display for Scope
sourcefn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Writes scope using the Self::as_str
representation
impl Copy for Scope
impl Eq for Scope
impl StructuralEq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more