Enum proto_pdk_api::PluginLocator
source · pub enum PluginLocator {
SourceFile {
file: String,
path: PathBuf,
},
SourceUrl {
url: String,
},
GitHub(Box<GitHubLocator>),
}
Expand description
Strategies for locating plugins.
Variants§
SourceFile
source:path/to/file.wasm
SourceUrl
source:https://url/to/file.wasm
GitHub(Box<GitHubLocator>)
github:owner/repo github:owner/repo@tag
Implementations§
source§impl PluginLocator
impl PluginLocator
pub fn extract_prefix_from_slug(slug: &str) -> &str
pub fn extract_suffix_from_slug(slug: &str) -> &str
pub fn create_wasm_file_prefix(name: &str) -> String
Trait Implementations§
source§impl AsRef<PluginLocator> for PluginLocator
impl AsRef<PluginLocator> for PluginLocator
source§fn as_ref(&self) -> &PluginLocator
fn as_ref(&self) -> &PluginLocator
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for PluginLocator
impl Clone for PluginLocator
source§fn clone(&self) -> PluginLocator
fn clone(&self) -> PluginLocator
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 PluginLocator
impl Debug for PluginLocator
source§impl<'de> Deserialize<'de> for PluginLocator
impl<'de> Deserialize<'de> for PluginLocator
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<PluginLocator, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PluginLocator, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PluginLocator
impl Display for PluginLocator
source§impl FromStr for PluginLocator
impl FromStr for PluginLocator
§type Err = PluginLocatorError
type Err = PluginLocatorError
The associated error which can be returned from parsing.
source§fn from_str(
value: &str
) -> Result<PluginLocator, <PluginLocator as FromStr>::Err>
fn from_str( value: &str ) -> Result<PluginLocator, <PluginLocator as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moresource§impl PartialEq for PluginLocator
impl PartialEq for PluginLocator
source§fn eq(&self, other: &PluginLocator) -> bool
fn eq(&self, other: &PluginLocator) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PluginLocator
impl Serialize for PluginLocator
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
source§impl TryFrom<String> for PluginLocator
impl TryFrom<String> for PluginLocator
§type Error = PluginLocatorError
type Error = PluginLocatorError
The type returned in the event of a conversion error.
source§fn try_from(
value: String
) -> Result<PluginLocator, <PluginLocator as TryFrom<String>>::Error>
fn try_from( value: String ) -> Result<PluginLocator, <PluginLocator as TryFrom<String>>::Error>
Performs the conversion.
impl Eq for PluginLocator
impl StructuralPartialEq for PluginLocator
Auto Trait Implementations§
impl Freeze for PluginLocator
impl RefUnwindSafe for PluginLocator
impl Send for PluginLocator
impl Sync for PluginLocator
impl Unpin for PluginLocator
impl UnwindSafe for PluginLocator
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