[−][src]Struct oceanpkg::drop::manifest::Manifest
A drop manifest.
Note the lack of drop::Name
usage throughout this type. This is because
name validation is done by the backend in order for clients to be
forward-compatible with later backend versions.
Fields
meta: Meta
The drop's info.
deps: Option<Deps>
The drops that this drop relies on.
Methods
impl Manifest
[src]
pub const FILE_NAME: &'static str
[src]
The name used for manifest files.
pub fn parse_json(json: &str) -> Result<Self, Error>
[src]
Parses a manifest from JSON.
use oceanpkg::drop::Manifest; let json = r#"{ "meta": { "name": "ocean", "description": "Cross-platform package manager", "version": "0.1.0", "license": "AGPL-3.0-only", "authors": ["Nikolai Vazquez", "Alex Farra", "Nicole Zhao"], "readme": "README.md", "changelog": "CHANGELOG.md", "git": "https://github.com/oceanpkg/ocean" }, "dependencies": { "wget": "*" } }"#; let manifest = Manifest::parse_json(json).unwrap();
pub fn read_json<J>(json: J) -> Result<Self, Error> where
J: Read,
[src]
J: Read,
Parses a manifest from JSON provided by the reader.
pub fn read_json_file<J>(json: J) -> Result<Self, Error> where
J: AsRef<Path>,
[src]
J: AsRef<Path>,
Parses a manifest from a JSON file at the given path.
pub fn to_json(&self, pretty: bool) -> Result<String, Error>
[src]
Returns self
as a JSON string.
pub fn files(&self) -> Vec<&str>
[src]
Returns the list of files to package.
Trait Implementations
impl Clone for Manifest
[src]
impl Debug for Manifest
[src]
impl<'de> Deserialize<'de> for Manifest
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Manifest
[src]
impl Hash for Manifest
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Manifest> for Manifest
[src]
impl Serialize for Manifest
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Manifest
[src]
impl StructuralPartialEq for Manifest
[src]
Auto Trait Implementations
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnwindSafe for Manifest
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,