pub struct Manifest {
pub manifest_schema_version: ManifestSchemaVersion,
pub plugin: PluginMetadata,
pub dependencies: Dependencies,
}Expand description
A parsed plugin manifest.
Fields§
§manifest_schema_version: ManifestSchemaVersion§plugin: PluginMetadata§dependencies: DependenciesImplementations§
Source§impl Manifest
impl Manifest
Sourcepub fn parse_toml(input: &str) -> Result<Manifest, SchemaErrors>
pub fn parse_toml(input: &str) -> Result<Manifest, SchemaErrors>
Parses a manifest from TOML, reporting every field-level defect in one
pass via SchemaErrors.
§Errors
Returns Err(SchemaErrors) with a single TomlParse error if TOML
syntax fails; a single error if manifest_schema_version is malformed
or unsupported (short-circuit, no field-level validation); or one or
more field-level errors with field-path context.
§Examples
use influxdb3_plugin_schemas::Manifest;
let source = r#"
manifest_schema_version = "1.0"
[plugin]
name = "example"
version = "0.1.0"
description = "Example plugin."
triggers = ["process_writes"]
[dependencies]
database_version = ">=3.0.0"
"#;
let manifest = Manifest::parse_toml(source).unwrap();
assert_eq!(manifest.plugin.name.as_str(), "example");Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Manifest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Manifest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Manifest
impl Serialize for Manifest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more