pub struct Argument {
pub name: Identifier,
pub argtype: ArgType,
pub opts: Vec<ArgOpt>,
/* private fields */
}
Expand description
Incoming or outgoing named argument
Fields§
§name: Identifier
§argtype: ArgType
§opts: Vec<ArgOpt>
Implementations§
Source§impl Argument
impl Argument
Sourcepub fn new_fake(argtype: ArgType, opts: Vec<ArgOpt>) -> Self
pub fn new_fake(argtype: ArgType, opts: Vec<ArgOpt>) -> Self
Construct a “fake” argument, which is essentially just an argument with empty name and no options. Can be used for return values when we need to convert them.
pub fn new<S: Into<String>, T: Into<String>>( name: S, argtype: T, opts: Vec<ArgOpt>, ) -> Self
pub fn evaluate_size(&self, arch: &Arch) -> Result<usize, Error>
pub fn resolve_to_basic(&self) -> &ArgType
pub fn is_ident(&self) -> bool
pub fn fill_in_templates( args: &mut [Argument], templates: &[TypeRaw], ) -> Result<usize, Error>
Sourcepub fn identifier(&self) -> &Identifier
pub fn identifier(&self) -> &Identifier
Get identifier for object
pub fn opts(&self) -> Iter<'_, ArgOpt>
pub fn arg_type(&self) -> &ArgType
Sourcepub fn arg_refers_to(&self) -> &Option<ArgIdent>
pub fn arg_refers_to(&self) -> &Option<ArgIdent>
Find out what the argument refers to, resource, struct, etc.
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 Eq for Argument
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