pub enum LocalField {
Named(Ident, Option<String>),
SelfField,
Local {
path: Path,
sig: Signature,
name_override: Option<String>,
},
Fields(FieldsDecl),
}Expand description
One arm of an expand_return! .field* list (type-level or per-fn). The name is stored raw (None = derive at replay time: for a
class-level field, the class member’s Kotlin name if the accessor is a
declared member, else snake_to_camel; for a per-fn field,
snake_to_camel).
Variants§
Named(Ident, Option<String>)
Include the named accessor’s value as a leaf/field, with an optional explicit name override.
SelfField
Include the handle itself as a field.
Local
Include a custom, locally-defined accessor’s value: any fn the
binding crate defines, declared with the one binding-local vocabulary
(fun!(crate::f).sig(sig!((v: &Self) -> Ret))) — no #[prebindgen]
item behind it, so the full signature (receiver explicit) is stated.
name_override follows the uniform field-name precedence.
Fields(FieldsDecl)
Include every field of the type’s value form — the struct returned
by the named accessor — each as its own field. Expands to the same
records the fields would produce if named one by one; see
ExpandReturnDecl::fields.
Trait Implementations§
Source§impl Clone for LocalField
impl Clone for LocalField
Source§fn clone(&self) -> LocalField
fn clone(&self) -> LocalField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Send for LocalField
impl !Sync for LocalField
impl Freeze for LocalField
impl RefUnwindSafe for LocalField
impl Unpin for LocalField
impl UnsafeUnpin for LocalField
impl UnwindSafe for LocalField
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
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> ⓘ
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> ⓘ
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