pub struct GenericFunction {
pub is_py_type: bool,
pub name: StringName,
pub pure: bool,
pub pos: Position,
pub arguments: Vec<GenericFunctionArg>,
pub raises: Name,
pub in_class: Option<StringName>,
pub ret_ty: Option<Name>,
}
Fields§
§is_py_type: bool
§name: StringName
§pure: bool
§pos: Position
§arguments: Vec<GenericFunctionArg>
§raises: Name
§in_class: Option<StringName>
§ret_ty: Option<Name>
Implementations§
Source§impl GenericFunction
impl GenericFunction
pub fn pure(self, pure: bool) -> Self
pub fn in_class( self, clss: Option<&StringName>, _ty_def: bool, pos: Position, ) -> TypeResult<GenericFunction>
Trait Implementations§
Source§impl Clone for GenericFunction
impl Clone for GenericFunction
Source§fn clone(&self) -> GenericFunction
fn clone(&self) -> GenericFunction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GenericFunction
impl Debug for GenericFunction
Source§impl From<&Funcdef> for GenericFunction
impl From<&Funcdef> for GenericFunction
Source§fn from(func_def: &Funcdef) -> GenericFunction
fn from(func_def: &Funcdef) -> GenericFunction
Converts to this type from the input type.
Source§impl Hash for GenericFunction
impl Hash for GenericFunction
Source§impl PartialEq for GenericFunction
impl PartialEq for GenericFunction
Source§impl TryFrom<&AST> for GenericFunction
impl TryFrom<&AST> for GenericFunction
impl Eq for GenericFunction
Auto Trait Implementations§
impl Freeze for GenericFunction
impl RefUnwindSafe for GenericFunction
impl Send for GenericFunction
impl Sync for GenericFunction
impl Unpin for GenericFunction
impl UnwindSafe for GenericFunction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more