pub struct Property {
pub kind: PropertyKind,
pub name: String,
}
Expand description
Polygon Property.
Fields§
§kind: PropertyKind
Property kind.
name: String
Property name.
Implementations§
Methods from Deref<Target = PropertyKind>§
sourcepub fn is_list(&self) -> bool
pub fn is_list(&self) -> bool
Returns true
if this value is of type List
. Returns false
otherwise
sourcepub fn is_scalar(&self) -> bool
pub fn is_scalar(&self) -> bool
Returns true
if this value is of type Scalar
. Returns false
otherwise
sourcepub fn try_unwrap_list_ref(
&self,
) -> Result<&ListPropertyKind, TryUnwrapError<&PropertyKind>>
pub fn try_unwrap_list_ref( &self, ) -> Result<&ListPropertyKind, TryUnwrapError<&PropertyKind>>
Attempts to unwrap this reference to the PropertyKind::List
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_list_mut(
&mut self,
) -> Result<&mut ListPropertyKind, TryUnwrapError<&mut PropertyKind>>
pub fn try_unwrap_list_mut( &mut self, ) -> Result<&mut ListPropertyKind, TryUnwrapError<&mut PropertyKind>>
Attempts to unwrap this mutable reference to the PropertyKind::List
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_scalar_ref(
&self,
) -> Result<&ScalarPropertyKind, TryUnwrapError<&PropertyKind>>
pub fn try_unwrap_scalar_ref( &self, ) -> Result<&ScalarPropertyKind, TryUnwrapError<&PropertyKind>>
Attempts to unwrap this reference to the PropertyKind::Scalar
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_scalar_mut(
&mut self,
) -> Result<&mut ScalarPropertyKind, TryUnwrapError<&mut PropertyKind>>
pub fn try_unwrap_scalar_mut( &mut self, ) -> Result<&mut ScalarPropertyKind, TryUnwrapError<&mut PropertyKind>>
Attempts to unwrap this mutable reference to the PropertyKind::Scalar
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
source§impl<'p> AsRef<&'p Property> for PropertyEntry<'p>
impl<'p> AsRef<&'p Property> for PropertyEntry<'p>
source§impl<'p> AsRef<&'p mut Property> for PropertyEntryMut<'p>
impl<'p> AsRef<&'p mut Property> for PropertyEntryMut<'p>
source§impl AsRef<PropertyKind> for Property
impl AsRef<PropertyKind> for Property
source§fn as_ref(&self) -> &PropertyKind
fn as_ref(&self) -> &PropertyKind
impl Eq for Property
impl StructuralPartialEq for Property
Auto Trait Implementations§
impl Freeze for Property
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnwindSafe for Property
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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>
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>
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