pub enum Return {
Infer,
Int(i128),
UInt(u128),
Float(f64),
String(String),
Object(Object),
Expression(Expression),
Identifier(String),
Array(Box<[Return]>),
Unit,
}Expand description
The Return enum is used as the return type of both methods and functions. It defines both the type and the value.
Variants§
Infer
The ‘Infer’ variant is the same as the _ token in Rust
Int(i128)
A signed integer
UInt(u128)
An unsigned integer
Float(f64)
A floating point value
String(String)
A String
Object(Object)
An Object (created via the SealedObjectType::new_instance method)
Expression(Expression)
An Expression (created via the Expression::try_from::<TokenStream> method)
Identifier(String)
Can be used to indirectly reference another value within the proc macro environment
Array(Box<[Return]>)
An array of Array enum values
Unit
The ‘Unit’ variant is the same as the () token in Rust
Trait Implementations§
Source§impl From<Expression> for Return
impl From<Expression> for Return
Source§fn from(value: Expression) -> Self
fn from(value: Expression) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Return
impl !RefUnwindSafe for Return
impl !Send for Return
impl !Sync for Return
impl Unpin for Return
impl !UnwindSafe for Return
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