[−][src]Struct vtil_parser::VTIL
Implementations
impl<T: 'static> VTIL<T>
[src]
pub fn new(
source: Box<T>,
inner_builder: impl for<'this> FnOnce(&'this <Box<T> as Deref>::Target) -> VTILInner<'this>,
phantom: PhantomData<T>
) -> Self
[src]
source: Box<T>,
inner_builder: impl for<'this> FnOnce(&'this <Box<T> as Deref>::Target) -> VTILInner<'this>,
phantom: PhantomData<T>
) -> Self
Constructs a new instance of this self-referential struct. (See also VTILBuilder::build()
). Each argument is a field of the new struct. Fields that refer to other fields inside the struct are initialized using functions instead of directly passing their value. The arguments are as follows:
Argument | Suggested Use |
---|---|
source | Directly pass in the value this field should contain |
inner_builder | Use a function or closure: (source: &_) -> inner: _ |
phantom | Directly pass in the value this field should contain |
pub fn try_new<Error_>(
source: Box<T>,
inner_builder: impl for<'this> FnOnce(&'this <Box<T> as Deref>::Target) -> Result<VTILInner<'this>, Error_>,
phantom: PhantomData<T>
) -> Result<Self, Error_>
[src]
source: Box<T>,
inner_builder: impl for<'this> FnOnce(&'this <Box<T> as Deref>::Target) -> Result<VTILInner<'this>, Error_>,
phantom: PhantomData<T>
) -> Result<Self, Error_>
(See also VTILTryBuilder::try_build()
.) Like new
, but builders for self-referencing fields can return results. If any of them fail, Err
is returned. If all of them succeed, Ok
is returned. The arguments are as follows:
Argument | Suggested Use |
---|---|
source | Directly pass in the value this field should contain |
inner_builder | Use a function or closure: (source: &_) -> Result<inner: _, Error_> |
phantom | Directly pass in the value this field should contain |
pub fn try_new_or_recover<Error_>(
source: Box<T>,
inner_builder: impl for<'this> FnOnce(&'this <Box<T> as Deref>::Target) -> Result<VTILInner<'this>, Error_>,
phantom: PhantomData<T>
) -> Result<Self, (Error_, Heads<T>)>
[src]
source: Box<T>,
inner_builder: impl for<'this> FnOnce(&'this <Box<T> as Deref>::Target) -> Result<VTILInner<'this>, Error_>,
phantom: PhantomData<T>
) -> Result<Self, (Error_, Heads<T>)>
(See also VTILTryBuilder::try_build_or_recover()
.) Like try_new
, but all head fields are returned in the case of an error. The arguments are as follows:
Argument | Suggested Use |
---|---|
source | Directly pass in the value this field should contain |
inner_builder | Use a function or closure: (source: &_) -> Result<inner: _, Error_> |
phantom | Directly pass in the value this field should contain |
pub fn with_source_contents<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow <Box<T> as Deref>::Target) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow <Box<T> as Deref>::Target) -> ReturnType
) -> ReturnType
Provides limited immutable access to the contents of source
. This method was generated because source
is immutably borrowed by other fields.
pub fn with_inner<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow VTILInner<'this>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow VTILInner<'this>) -> ReturnType
) -> ReturnType
Provides an immutable reference to inner
. This method was generated because inner
is a tail field.
pub fn with_inner_mut<'outer_borrow, ReturnType>(
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut VTILInner<'this>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut VTILInner<'this>) -> ReturnType
) -> ReturnType
Provides a mutable reference to inner
. This method was generated because inner
is a tail field.
pub fn with_phantom<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow PhantomData<T>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow PhantomData<T>) -> ReturnType
) -> ReturnType
Provides an immutable reference to phantom
. This method was generated because phantom
is a tail field.
pub fn with_phantom_mut<'outer_borrow, ReturnType>(
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut PhantomData<T>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut PhantomData<T>) -> ReturnType
) -> ReturnType
Provides a mutable reference to phantom
. This method was generated because phantom
is a tail field.
pub fn with<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(BorrowedFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow self,
user: impl for<'this> FnOnce(BorrowedFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
This method provides immutable references to all tail and immutably borrowed fields.
pub fn with_mut<'outer_borrow, ReturnType>(
&'outer_borrow mut self,
user: impl for<'this> FnOnce(BorrowedMutFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow mut self,
user: impl for<'this> FnOnce(BorrowedMutFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
This method provides mutable references to all tail fields.
pub fn into_heads(self) -> Heads<T>
[src]
This function drops all internally referencing fields and returns only the head fields of this struct.
impl<T> VTIL<T>
[src]
pub fn header(&self) -> &Header
[src]
pub fn vip(&self) -> &Vip
[src]
pub fn routine_convention(&self) -> &RoutineConvention
[src]
pub fn subroutine_convention(&self) -> &SubroutineConvention
[src]
pub fn spec_subroutine_conventions(&self) -> &Vec<SubroutineConvention>
[src]
pub fn explored_blocks(&self) -> &Vec<BasicBlock<'_>>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for VTIL<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for VTIL<T> where
T: Send,
T: Send,
impl<T> Sync for VTIL<T> where
T: Sync,
T: Sync,
impl<T> Unpin for VTIL<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for VTIL<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,