pub enum Platform {
PfSense,
OPNsense,
}
Expand description
Represents the supported platforms.
Variants§
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn from_string(value: &str) -> Result<Platform, Error>
pub fn from_string(value: &str) -> Result<Platform, Error>
Converts a string representation into a Platform
enum.
§Parameters
value
: AString
containing the name of the platform.
§Returns
Ok(Platform)
: If the string matches a supported platform.Err(Error)
: If the string does not match any supported platform.
§Errors
Returns an Error
with the kind ErrorUnsupportedPlatform
if the input string is not recognized as a valid platform.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnwindSafe for Platform
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