pub struct SpeciesInteraction { /* private fields */ }Implementations§
Source§impl SpeciesInteraction
impl SpeciesInteraction
Sourcepub fn new(
first: impl AsRef<str>,
second: impl AsRef<str>,
kind: SpeciesInteractionKind,
) -> Result<Self, InteractionTextError>
pub fn new( first: impl AsRef<str>, second: impl AsRef<str>, kind: SpeciesInteractionKind, ) -> Result<Self, InteractionTextError>
§Errors
Returns InteractionTextError::Empty when first or second is blank.
pub fn with_strength(self, strength: InteractionStrength) -> Self
pub fn first(&self) -> &str
pub fn second(&self) -> &str
pub const fn kind(&self) -> &SpeciesInteractionKind
pub const fn strength(&self) -> Option<&InteractionStrength>
Trait Implementations§
Source§impl Clone for SpeciesInteraction
impl Clone for SpeciesInteraction
Source§fn clone(&self) -> SpeciesInteraction
fn clone(&self) -> SpeciesInteraction
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 SpeciesInteraction
impl Debug for SpeciesInteraction
Source§impl Display for SpeciesInteraction
impl Display for SpeciesInteraction
Source§impl Hash for SpeciesInteraction
impl Hash for SpeciesInteraction
Source§impl Ord for SpeciesInteraction
impl Ord for SpeciesInteraction
Source§fn cmp(&self, other: &SpeciesInteraction) -> Ordering
fn cmp(&self, other: &SpeciesInteraction) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SpeciesInteraction
impl PartialEq for SpeciesInteraction
Source§impl PartialOrd for SpeciesInteraction
impl PartialOrd for SpeciesInteraction
impl Eq for SpeciesInteraction
impl StructuralPartialEq for SpeciesInteraction
Auto Trait Implementations§
impl Freeze for SpeciesInteraction
impl RefUnwindSafe for SpeciesInteraction
impl Send for SpeciesInteraction
impl Sync for SpeciesInteraction
impl Unpin for SpeciesInteraction
impl UnsafeUnpin for SpeciesInteraction
impl UnwindSafe for SpeciesInteraction
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