pub enum RustTypeRepr {
CPrimitive(CPrimitiveKind),
RustPrimitive(RustPrimitiveKind),
Pointer {
inner: Box<RustTypeRepr>,
is_const: bool,
},
Reference {
inner: Box<RustTypeRepr>,
is_mut: bool,
},
Named(String),
Option(Box<RustTypeRepr>),
FnPointer {
params: Vec<RustTypeRepr>,
ret: Option<Box<RustTypeRepr>>,
},
Unit,
Unknown(String),
}Expand description
Rust 型表現(syn::Type から変換)
Variants§
CPrimitive(CPrimitiveKind)
C互換基本型 (c_int, c_char, etc.)
RustPrimitive(RustPrimitiveKind)
Rust基本型 (i32, u64, bool, etc.)
Pointer
ポインタ (*mut T, *const T)
Reference
参照 (&T, &mut T)
Named(String)
名前付き型 (SV, AV, PerlInterpreter, etc.)
Option(Box<RustTypeRepr>)
Option
FnPointer
関数ポインタ
Unit
ユニット ()
Unknown(String)
パース不能だった型(文字列で保持)
Implementations§
Source§impl RustTypeRepr
impl RustTypeRepr
Sourcepub fn from_type_string(s: &str) -> Self
pub fn from_type_string(s: &str) -> Self
型文字列から RustTypeRepr をパース
Source§impl RustTypeRepr
impl RustTypeRepr
Sourcepub fn make_outer_pointer_const(&mut self)
pub fn make_outer_pointer_const(&mut self)
最外ポインタの is_const を true に変更する
Sourcepub fn has_outer_pointer(&self) -> bool
pub fn has_outer_pointer(&self) -> bool
最外ポインタを持つかどうか
Source§impl RustTypeRepr
impl RustTypeRepr
Sourcepub fn to_display_string(&self) -> String
pub fn to_display_string(&self) -> String
表示用文字列に変換
Trait Implementations§
Source§impl Clone for RustTypeRepr
impl Clone for RustTypeRepr
Source§fn clone(&self) -> RustTypeRepr
fn clone(&self) -> RustTypeRepr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RustTypeRepr
impl Debug for RustTypeRepr
Source§impl PartialEq for RustTypeRepr
impl PartialEq for RustTypeRepr
Source§fn eq(&self, other: &RustTypeRepr) -> bool
fn eq(&self, other: &RustTypeRepr) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RustTypeRepr
impl StructuralPartialEq for RustTypeRepr
Auto Trait Implementations§
impl Freeze for RustTypeRepr
impl RefUnwindSafe for RustTypeRepr
impl Send for RustTypeRepr
impl Sync for RustTypeRepr
impl Unpin for RustTypeRepr
impl UnsafeUnpin for RustTypeRepr
impl UnwindSafe for RustTypeRepr
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