pub struct Argument {
pub name: String,
pub atype: Option<String>,
pub value: Option<String>,
}
Expand description
Represents a parsed function argument.
Fields§
§name: String
§atype: Option<String>
§value: Option<String>
Implementations§
Source§impl Argument
impl Argument
Sourcepub fn new<S: Into<String>>(name: S, atype: Option<S>) -> Self
pub fn new<S: Into<String>>(name: S, atype: Option<S>) -> Self
Creates a new Argument instance.
§Example
use thinlinelib::analysis::Argument;
let argument = Argument::new("int1", Some("int"));
assert_eq!(argument.name, "int1");
assert!(argument.atype.is_some());
assert_eq!(argument.atype.unwrap(), "int");
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Argument
impl<'de> Deserialize<'de> for Argument
Source§fn 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 Argument
Auto Trait Implementations§
impl Freeze for Argument
impl RefUnwindSafe for Argument
impl Send for Argument
impl Sync for Argument
impl Unpin for Argument
impl UnwindSafe for Argument
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