Struct misc_conf::ast::Directive

source ·
pub struct Directive<S, T = String>where
    S: Clone + Default,
    T: FromLiteral,{
    pub name: T,
    pub args: Vec<T>,
    pub children: Option<Vec<Directive<S, T>>>,
    /* private fields */
}

Fields§

§name: T§args: Vec<T>§children: Option<Vec<Directive<S, T>>>

Implementations§

source§

impl<S, T> Directive<S, T>where S: Clone + Default, T: FromLiteral + AsRef<str>,

source

pub fn query(&self, path: &str) -> Vec<Self>

source

pub fn cpath_query(&self, path: &CPath) -> Vec<Self>

Trait Implementations§

source§

impl<S, T> AsMut<Directive<S, T>> for Directive<S, T>where S: Clone + Default, T: FromLiteral,

source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<S, T> Clone for Directive<S, T>where S: Clone + Default + Clone, T: FromLiteral + Clone,

source§

fn clone(&self) -> Directive<S, T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S, T> Debug for Directive<S, T>where S: Clone + Default + Debug, T: FromLiteral + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S, T> Default for Directive<S, T>where S: Clone + Default + Default, T: FromLiteral + Default,

source§

fn default() -> Directive<S, T>

Returns the “default value” for a type. Read more
source§

impl DirectiveTrait<Apache, String> for Directive<Apache>

source§

fn parse(input: &[u8]) -> Result<Vec<Self>>

source§

fn resolve_include_inner(self, dir: &Path, out: &mut Vec<Self>) -> Result<()>

source§

fn resolve_include(&mut self, dir: &Path) -> Result<()>

source§

impl DirectiveTrait<Nginx, String> for Directive<Nginx>

source§

fn parse(input: &[u8]) -> Result<Vec<Self>>

source§

fn resolve_include_inner(self, dir: &Path, out: &mut Vec<Self>) -> Result<()>

source§

fn resolve_include(&mut self, dir: &Path) -> Result<()>

source§

impl<S, T> PartialEq<Directive<S, T>> for Directive<S, T>where S: Clone + Default, T: FromLiteral,

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S, T> Eq for Directive<S, T>where S: Clone + Default + Eq, T: FromLiteral + Eq,

source§

impl<S, T> StructuralEq for Directive<S, T>where S: Clone + Default, T: FromLiteral,

Auto Trait Implementations§

§

impl<S, T> RefUnwindSafe for Directive<S, T>where S: RefUnwindSafe, T: RefUnwindSafe,

§

impl<S, T> Send for Directive<S, T>where S: Send, T: Send,

§

impl<S, T> Sync for Directive<S, T>where S: Sync, T: Sync,

§

impl<S, T> Unpin for Directive<S, T>where S: Unpin, T: Unpin,

§

impl<S, T> UnwindSafe for Directive<S, T>where S: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.