Phrase

Trait Phrase 

Source
pub trait Phrase {
    type Head;

    // Required methods
    fn from_head(head: Self::Head) -> Self;
    fn head(&self) -> &Self::Head;
    fn with_head(self, head: Self::Head) -> Self;
}

Required Associated Types§

Required Methods§

Source

fn from_head(head: Self::Head) -> Self

Source

fn head(&self) -> &Self::Head

Source

fn with_head(self, head: Self::Head) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W> Phrase for AdjP<W>
where W: Word,

Source§

impl<W> Phrase for AdvP<W>
where W: Word,

Source§

impl<W> Phrase for CP<W>
where W: Word,

Source§

impl<W> Phrase for NP<W>
where W: Word,

Source§

type Head = Noun<W>

Source§

impl<W> Phrase for PP<W>
where W: Word,

Source§

impl<W> Phrase for VP<W>
where W: Word,

Source§

type Head = Verb<W>