pub struct DecompositionContext { /* private fields */ }Expand description
Context about the analysed subject.
§Examples
use whitaker_common::decomposition_advice::{DecompositionContext, SubjectKind};
let context = DecompositionContext::new("Parser", SubjectKind::Type);
assert_eq!(context.subject_name(), "Parser");
assert_eq!(context.subject_kind(), SubjectKind::Type);Implementations§
Source§impl DecompositionContext
impl DecompositionContext
Sourcepub fn new(subject_name: impl Into<String>, subject_kind: SubjectKind) -> Self
pub fn new(subject_name: impl Into<String>, subject_kind: SubjectKind) -> Self
Creates a new decomposition-analysis context.
Sourcepub fn subject_name(&self) -> &str
pub fn subject_name(&self) -> &str
Returns the analysed subject name.
Sourcepub fn subject_kind(&self) -> SubjectKind
pub fn subject_kind(&self) -> SubjectKind
Returns the analysed subject kind.
Trait Implementations§
Source§impl Clone for DecompositionContext
impl Clone for DecompositionContext
Source§fn clone(&self) -> DecompositionContext
fn clone(&self) -> DecompositionContext
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 DecompositionContext
impl Debug for DecompositionContext
impl Eq for DecompositionContext
Source§impl PartialEq for DecompositionContext
impl PartialEq for DecompositionContext
impl StructuralPartialEq for DecompositionContext
Auto Trait Implementations§
impl Freeze for DecompositionContext
impl RefUnwindSafe for DecompositionContext
impl Send for DecompositionContext
impl Sync for DecompositionContext
impl Unpin for DecompositionContext
impl UnsafeUnpin for DecompositionContext
impl UnwindSafe for DecompositionContext
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