Struct uniffi_bindgen::interface::function::Argument
source · pub struct Argument {
pub(super) name: String,
pub(super) type_: Type,
pub(super) by_ref: bool,
pub(super) optional: bool,
pub(super) default: Option<Literal>,
}
Expand description
Represents an argument to a function/constructor/method call.
Each argument has a name and a type, along with some optional metadata.
Fields§
§name: String
§type_: Type
§by_ref: bool
§optional: bool
§default: Option<Literal>
Implementations§
source§impl Argument
impl Argument
pub fn name(&self) -> &str
pub fn by_ref(&self) -> bool
pub fn is_trait_ref(&self) -> bool
pub fn default_value(&self) -> Option<&Literal>
pub fn iter_types(&self) -> TypeIterator<'_>
Trait Implementations§
source§impl From<&Argument> for FfiArgument
impl From<&Argument> for FfiArgument
source§fn from(a: &Argument) -> FfiArgument
fn from(a: &Argument) -> FfiArgument
Converts to this type from the input type.
Auto Trait Implementations§
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