Struct nu_protocol::ast::Call
source · [−]pub struct Call {
pub decl_id: DeclId,
pub head: Span,
pub arguments: Vec<Argument>,
pub redirect_stdout: bool,
pub redirect_stderr: bool,
}Fields
decl_id: DeclIdidentifier of the declaration to call
head: Spanarguments: Vec<Argument>redirect_stdout: boolredirect_stderr: boolImplementations
sourceimpl Call
impl Call
pub fn new(head: Span) -> Call
pub fn named_iter(
&self
) -> impl Iterator<Item = &(Spanned<String>, Option<Spanned<String>>, Option<Expression>)>
pub fn named_iter_mut(
&mut self
) -> impl Iterator<Item = &mut (Spanned<String>, Option<Spanned<String>>, Option<Expression>)>
pub fn named_len(&self) -> usize
pub fn add_named(
&mut self,
named: (Spanned<String>, Option<Spanned<String>>, Option<Expression>)
)
pub fn add_positional(&mut self, positional: Expression)
pub fn positional_iter(&self) -> impl Iterator<Item = &Expression>
pub fn positional_iter_mut(&mut self) -> impl Iterator<Item = &mut Expression>
pub fn positional_nth(&self, i: usize) -> Option<&Expression>
pub fn positional_len(&self) -> usize
pub fn has_flag(&self, flag_name: &str) -> bool
pub fn get_flag_expr(&self, flag_name: &str) -> Option<Expression>
pub fn get_named_arg(&self, flag_name: &str) -> Option<Spanned<String>>
pub fn span(&self) -> Span
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Call
impl<'de> Deserialize<'de> for Call
sourcefn 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
impl StructuralPartialEq for Call
Auto Trait Implementations
impl RefUnwindSafe for Call
impl Send for Call
impl Sync for Call
impl Unpin for Call
impl UnwindSafe for Call
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> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
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