Enum nu_protocol::SyntaxShape [−][src]
pub enum SyntaxShape {
Show variants
Any,
String,
ColumnPath,
FullColumnPath,
Number,
Range,
Int,
FilePath,
GlobPattern,
Block,
Table,
Unit,
Operator,
RowCondition,
MathExpression,
}Expand description
The syntactic shapes that values must match to be passed into a command. You can think of this as the type-checking that occurs when you call a function.
Variants
Expand description
Any syntactic form is allowed
Expand description
Strings and string-like bare words are allowed
Expand description
A dotted path to navigate the table
Expand description
A dotted path to navigate the table (including variable)
Expand description
Only a numeric (integer or decimal) value is allowed
Expand description
A range is allowed (eg, 1..3)
Expand description
Only an integer value is allowed
Expand description
A filepath is allowed
Expand description
A glob pattern is allowed, eg foo*
Expand description
A block is allowed, eg {start this thing}
Expand description
A table is allowed, eg [first second]
Expand description
A unit value is allowed, eg 10kb
Expand description
An operator
Expand description
A math expression which expands shorthand forms on the lefthand side, eg foo > 1
The shorthand allows us to more easily reach columns inside of the row being passed in
Expand description
A general math expression, eg the 1 + 2 of = 1 + 2
Trait Implementations
impl Clone for SyntaxShape[src]
impl Clone for SyntaxShape[src]fn clone(&self) -> SyntaxShape[src]
fn clone(&self) -> SyntaxShape[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for SyntaxShape[src]
impl Debug for SyntaxShape[src]impl<'de> Deserialize<'de> for SyntaxShape[src]
impl<'de> Deserialize<'de> for SyntaxShape[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl Hash for SyntaxShape[src]
impl Hash for SyntaxShape[src]impl PartialEq<SyntaxShape> for SyntaxShape[src]
impl PartialEq<SyntaxShape> for SyntaxShape[src]impl PrettyDebug for SyntaxShape[src]
impl PrettyDebug for SyntaxShape[src]fn pretty(&self) -> DebugDocBuilder[src]
fn pretty(&self) -> DebugDocBuilder[src]Prepare SyntaxShape for pretty-printing
fn to_doc(&self) -> DebugDoc[src]
fn pretty_doc(
&self
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>[src]
&self
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
fn pretty_builder(&self) -> DocBuilder<'static, BoxAllocator, ShellAnnotation>[src]
fn display(&self) -> String[src]
fn display(&self) -> String[src]A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more
fn plain_string(&self, width: usize) -> String[src]
fn colored_string(&self, width: usize) -> String[src]
impl Serialize for SyntaxShape[src]
impl Serialize for SyntaxShape[src]impl Copy for SyntaxShape[src]
impl Eq for SyntaxShape[src]
impl StructuralEq for SyntaxShape[src]
impl StructuralPartialEq for SyntaxShape[src]
Auto Trait Implementations
impl RefUnwindSafe for SyntaxShape
impl Send for SyntaxShape
impl Sync for SyntaxShape
impl Unpin for SyntaxShape
impl UnwindSafe for SyntaxShape
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]pub fn equivalent(&self, key: &K) -> bool[src]
pub fn equivalent(&self, key: &K) -> bool[src]Compare self to key and return true if they are equal.
impl<T> PrettyDebugWithSource for T where
T: PrettyDebug, [src]
impl<T> PrettyDebugWithSource for T where
T: PrettyDebug, [src]pub fn pretty_debug(&self, _source: &str) -> DebugDocBuilder[src]
fn refined_pretty_debug(
&self,
_refine: PrettyDebugRefineKind,
source: &str
) -> DebugDocBuilder[src]
&self,
_refine: PrettyDebugRefineKind,
source: &str
) -> DebugDocBuilder
fn debug(&self, source: impl Into<Text>) -> String where
Self: Clone, [src]
Self: Clone,
fn debuggable(self, source: impl Into<Text>) -> DebuggableWithSource<Self>[src]
impl<T> SpannedItem for T[src]
impl<T> SpannedItem for T[src]impl<T> TaggedItem for T[src]
impl<T> TaggedItem for T[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe 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
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,