Skip to main content

NodeOptions

Struct NodeOptions 

Source
pub(crate) struct NodeOptions {
    pub(crate) state: PathBuf,
    pub(crate) port: u16,
    pub(crate) create: Vec<String>,
    pub(crate) extra: Vec<String>,
}
Expand description

The node URL configured for this directory, if any.

Walks up from the working directory looking for .choir/config, the way git finds a repository. A file rather than an environment variable on purpose: this workspace takes configuration from flags and files, and the handful of environment reads that exist are deliberately not configuration.

Walking up rather than reading one fixed path means a checkout can name the node it belongs to, which is the same thing a git remote does and needs no explaining to anybody who has used one. What choir node serve and choir node install were told, after defaults.

One parser for both because they describe the same node: a supervised node and a hand-started one must be the same command with the same arguments, and two parsers is how they stop being.

Fields§

§state: PathBuf§port: u16§create: Vec<String>§extra: Vec<String>

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.