pub enum ResourceDefinition {
TcpPort(TcpPort),
UdpPort(UdpPort),
Url(UrlResource),
Volume(Volume),
}Expand description
Normalized representation of a resource definition.
Variants§
TcpPort(TcpPort)
A TCP port.
UdpPort(UdpPort)
A UDP port.
Url(UrlResource)
A URL resource.
Volume(Volume)
A filesystem or network volume.
Implementations§
Source§impl ResourceDefinition
impl ResourceDefinition
pub const fn kind(&self) -> ResourceKind
pub fn try_tcpport(self) -> Result<TcpPort, ManifestError>
pub fn try_udpport(self) -> Result<UdpPort, ManifestError>
pub fn try_url(self) -> Result<UrlResource, ManifestError>
pub fn try_volume(self) -> Result<Volume, ManifestError>
Trait Implementations§
Source§impl AssetManager for ResourceDefinition
impl AssetManager for ResourceDefinition
type Asset = AssetReference
fn set_baseurl(&self, baseurl: &Path)
fn assets(&self) -> Assets<'_, AssetReference>
fn get_asset_flags(&self) -> u32
Source§impl Clone for ResourceDefinition
impl Clone for ResourceDefinition
Source§fn clone(&self) -> ResourceDefinition
fn clone(&self) -> ResourceDefinition
Returns a duplicate 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 ResourceDefinition
impl Debug for ResourceDefinition
Source§impl From<&ResourceDefinition> for AuditedResource
impl From<&ResourceDefinition> for AuditedResource
Source§fn from(value: &ResourceDefinition) -> Self
fn from(value: &ResourceDefinition) -> Self
Converts to this type from the input type.
Source§impl From<AuditedResourceBinding> for ResourceDefinition
impl From<AuditedResourceBinding> for ResourceDefinition
Source§fn from(value: AuditedResourceBinding) -> Self
fn from(value: AuditedResourceBinding) -> Self
Converts to this type from the input type.
Source§impl From<TcpPort> for ResourceDefinition
impl From<TcpPort> for ResourceDefinition
Source§impl From<UdpPort> for ResourceDefinition
impl From<UdpPort> for ResourceDefinition
Source§impl From<UrlResource> for ResourceDefinition
impl From<UrlResource> for ResourceDefinition
Source§fn from(value: UrlResource) -> Self
fn from(value: UrlResource) -> Self
Converts to this type from the input type.
Source§impl From<Volume> for ResourceDefinition
impl From<Volume> for ResourceDefinition
Source§impl Hash for ResourceDefinition
impl Hash for ResourceDefinition
Source§impl PartialEq for ResourceDefinition
impl PartialEq for ResourceDefinition
Source§impl Serialize for ResourceDefinition
impl Serialize for ResourceDefinition
Source§impl TryFrom<ResourceDefinition> for ResourceDefinition
impl TryFrom<ResourceDefinition> for ResourceDefinition
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§impl TryFrom<ResourceDefinition> for ResourceDefinition
impl TryFrom<ResourceDefinition> for ResourceDefinition
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§impl TryFrom<ResourceDefinition> for TcpPort
impl TryFrom<ResourceDefinition> for TcpPort
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§impl TryFrom<ResourceDefinition> for UdpPort
impl TryFrom<ResourceDefinition> for UdpPort
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§impl TryFrom<ResourceDefinition> for UrlResource
impl TryFrom<ResourceDefinition> for UrlResource
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§impl TryFrom<ResourceDefinition> for Volume
impl TryFrom<ResourceDefinition> for Volume
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
impl Eq for ResourceDefinition
impl StructuralPartialEq for ResourceDefinition
Auto Trait Implementations§
impl Freeze for ResourceDefinition
impl !RefUnwindSafe for ResourceDefinition
impl Send for ResourceDefinition
impl Sync for ResourceDefinition
impl Unpin for ResourceDefinition
impl !UnwindSafe for ResourceDefinition
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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