#[non_exhaustive]pub struct ReceiverFactContext<'a> {
pub type_environment: Option<&'a TypeEnvironment>,
pub source: Option<&'a str>,
}Expand description
Context used while extracting a receiver fact.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type_environment: Option<&'a TypeEnvironment>Rich type environment available at the call site.
source: Option<&'a str>Source text for distinguishing syntax that the AST intentionally erases,
such as $hash{key} versus $hashref->{key}.
Implementations§
Source§impl<'a> ReceiverFactContext<'a>
impl<'a> ReceiverFactContext<'a>
Sourcepub fn new(
type_environment: Option<&'a TypeEnvironment>,
) -> ReceiverFactContext<'a>
pub fn new( type_environment: Option<&'a TypeEnvironment>, ) -> ReceiverFactContext<'a>
Creates a receiver-fact context from an optional type environment.
Sourcepub fn with_source(self, source: &'a str) -> ReceiverFactContext<'a>
pub fn with_source(self, source: &'a str) -> ReceiverFactContext<'a>
Adds source text to the receiver-fact context.
Trait Implementations§
Source§impl<'a> Clone for ReceiverFactContext<'a>
impl<'a> Clone for ReceiverFactContext<'a>
Source§fn clone(&self) -> ReceiverFactContext<'a>
fn clone(&self) -> ReceiverFactContext<'a>
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 moreimpl<'a> Copy for ReceiverFactContext<'a>
Source§impl<'a> Debug for ReceiverFactContext<'a>
impl<'a> Debug for ReceiverFactContext<'a>
Source§impl<'a> Default for ReceiverFactContext<'a>
impl<'a> Default for ReceiverFactContext<'a>
Source§fn default() -> ReceiverFactContext<'a>
fn default() -> ReceiverFactContext<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ReceiverFactContext<'a>
impl<'a> RefUnwindSafe for ReceiverFactContext<'a>
impl<'a> Send for ReceiverFactContext<'a>
impl<'a> Sync for ReceiverFactContext<'a>
impl<'a> Unpin for ReceiverFactContext<'a>
impl<'a> UnsafeUnpin for ReceiverFactContext<'a>
impl<'a> UnwindSafe for ReceiverFactContext<'a>
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