pub enum ResourceReferenceFlags {
Legacy(ResourceReferenceFlagsLegacy),
Standard(ResourceReferenceFlagsStandard),
}
Expand description
Reference flags for a given resource, defines the metadata of a reference
Variants§
Legacy(ResourceReferenceFlagsLegacy)
Standard(ResourceReferenceFlagsStandard)
Implementations§
Source§impl ResourceReferenceFlags
impl ResourceReferenceFlags
Sourcepub fn to_legacy(&self) -> ResourceReferenceFlagsLegacy
pub fn to_legacy(&self) -> ResourceReferenceFlagsLegacy
let flag_v1 = ResourceReferenceFlagsLegacy::new().with_install_dependency(true).with_runtime_acquired(true);
let flag_v2 = ResourceReferenceFlagsStandard::new().with_reference_type(ReferenceType::INSTALL).with_runtime_acquired(true);
assert_eq!(flag_v1, ResourceReferenceFlags::Standard(flag_v2).to_legacy());
Sourcepub fn to_standard(&self) -> ResourceReferenceFlagsStandard
pub fn to_standard(&self) -> ResourceReferenceFlagsStandard
let flag_v1 = ResourceReferenceFlagsLegacy::new().with_install_dependency(true).with_runtime_acquired(true);
let flag_v2 = ResourceReferenceFlagsStandard::new().with_reference_type(ReferenceType::INSTALL).with_runtime_acquired(true).with_language_code(0x1F);
assert_eq!(flag_v2, ResourceReferenceFlags::Legacy(flag_v1).to_standard());
pub fn as_byte(&self) -> u8
Source§impl ResourceReferenceFlags
impl ResourceReferenceFlags
pub fn language_code(&self) -> u8
pub fn is_acquired(&self) -> bool
pub fn reference_type(&self) -> ReferenceType
Trait Implementations§
Source§impl Clone for ResourceReferenceFlags
impl Clone for ResourceReferenceFlags
Source§fn clone(&self) -> ResourceReferenceFlags
fn clone(&self) -> ResourceReferenceFlags
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 ResourceReferenceFlags
impl Debug for ResourceReferenceFlags
Source§impl From<ResourceReferenceFlags> for ResourceReferenceFlagsLegacy
impl From<ResourceReferenceFlags> for ResourceReferenceFlagsLegacy
Source§fn from(value: ResourceReferenceFlags) -> Self
fn from(value: ResourceReferenceFlags) -> Self
Converts to this type from the input type.
Source§impl From<ResourceReferenceFlags> for ResourceReferenceFlagsStandard
impl From<ResourceReferenceFlags> for ResourceReferenceFlagsStandard
Source§fn from(value: ResourceReferenceFlags) -> Self
fn from(value: ResourceReferenceFlags) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ResourceReferenceFlags
impl PartialEq for ResourceReferenceFlags
impl Copy for ResourceReferenceFlags
impl Eq for ResourceReferenceFlags
impl StructuralPartialEq for ResourceReferenceFlags
Auto Trait Implementations§
impl Freeze for ResourceReferenceFlags
impl RefUnwindSafe for ResourceReferenceFlags
impl Send for ResourceReferenceFlags
impl Sync for ResourceReferenceFlags
impl Unpin for ResourceReferenceFlags
impl UnwindSafe for ResourceReferenceFlags
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<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