pub enum LibSourceSpec {
Symbol(String),
Path(PathBuf),
Url(String),
Bytes(Vec<u8>),
Host(String),
CratesIo(CratesIoSpec),
}Expand description
Library source syntax accepted by the command line.
Each variant maps to a kind:value spelling parsed via FromStr.
§Examples
use sim_run_core::LibSourceSpec;
assert_eq!(
"symbol:codec/lisp".parse::<LibSourceSpec>().unwrap(),
LibSourceSpec::Symbol("codec/lisp".to_owned()),
);
assert!("codec/lisp".parse::<LibSourceSpec>().is_err());Variants§
Symbol(String)
A symbol:NAME source resolved through the kernel loader.
Path(PathBuf)
A path:PATH source read from the local filesystem.
Url(String)
A url:URL source fetched from a remote location.
Bytes(Vec<u8>)
A bytes:TEXT source holding inline library bytes.
Host(String)
A host:NAME source provided by the host environment.
CratesIo(CratesIoSpec)
A crates.io:NAME@REQ source resolved outside the kernel.
Trait Implementations§
Source§impl Clone for LibSourceSpec
impl Clone for LibSourceSpec
Source§fn clone(&self) -> LibSourceSpec
fn clone(&self) -> LibSourceSpec
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 LibSourceSpec
impl Debug for LibSourceSpec
Source§impl Display for LibSourceSpec
impl Display for LibSourceSpec
impl Eq for LibSourceSpec
Source§impl FromStr for LibSourceSpec
impl FromStr for LibSourceSpec
Source§impl PartialEq for LibSourceSpec
impl PartialEq for LibSourceSpec
Source§fn eq(&self, other: &LibSourceSpec) -> bool
fn eq(&self, other: &LibSourceSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LibSourceSpec
Auto Trait Implementations§
impl Freeze for LibSourceSpec
impl RefUnwindSafe for LibSourceSpec
impl Send for LibSourceSpec
impl Sync for LibSourceSpec
impl Unpin for LibSourceSpec
impl UnsafeUnpin for LibSourceSpec
impl UnwindSafe for LibSourceSpec
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