Enum cargo_rx::ExampleType
source · pub enum ExampleType {
Simple,
MultiFile,
Crate(PathBuf, Option<String>),
Custom,
}Expand description
Represents the type of an example file.
Variants§
Simple
This represents a simple example file, for ex. a hello_world.rs
file in an examples/ folder.
MultiFile
This represents a main.rs file nested within a sub-folder in an
examples/ folder; the Rust book also calls this a multi-file
example.
Crate(PathBuf, Option<String>)
This represents a binary crate, i.e. a sub-folder containing a
Cargo.toml file in an examples/ folder; Note that Cargo (and
notably cargo run --example) does not support this particular
use-case, as of yet.
Custom
This represents an example file with a custom path defined in the
Cargo.toml file of a Cargo project.
Trait Implementations§
source§impl Clone for ExampleType
impl Clone for ExampleType
source§fn clone(&self) -> ExampleType
fn clone(&self) -> ExampleType
Returns a copy of the value. Read more
1.0.0 · 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 ExampleType
impl Debug for ExampleType
source§impl Hash for ExampleType
impl Hash for ExampleType
source§impl PartialEq<ExampleType> for ExampleType
impl PartialEq<ExampleType> for ExampleType
source§fn eq(&self, other: &ExampleType) -> bool
fn eq(&self, other: &ExampleType) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ExampleType
impl StructuralEq for ExampleType
impl StructuralPartialEq for ExampleType
Auto Trait Implementations§
impl RefUnwindSafe for ExampleType
impl Send for ExampleType
impl Sync for ExampleType
impl Unpin for ExampleType
impl UnwindSafe for ExampleType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.