pub struct FoodWebLink { /* private fields */ }Implementations§
Source§impl FoodWebLink
impl FoodWebLink
Sourcepub fn new(
source: impl AsRef<str>,
target: impl AsRef<str>,
relation: FeedingRelation,
) -> Result<Self, FoodWebTextError>
pub fn new( source: impl AsRef<str>, target: impl AsRef<str>, relation: FeedingRelation, ) -> Result<Self, FoodWebTextError>
§Errors
Returns FoodWebTextError::Empty when source or target is blank.
pub fn source(&self) -> &str
pub fn target(&self) -> &str
pub const fn relation(&self) -> &FeedingRelation
Trait Implementations§
Source§impl Clone for FoodWebLink
impl Clone for FoodWebLink
Source§fn clone(&self) -> FoodWebLink
fn clone(&self) -> FoodWebLink
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 FoodWebLink
impl Debug for FoodWebLink
Source§impl Display for FoodWebLink
impl Display for FoodWebLink
Source§impl Hash for FoodWebLink
impl Hash for FoodWebLink
Source§impl Ord for FoodWebLink
impl Ord for FoodWebLink
Source§fn cmp(&self, other: &FoodWebLink) -> Ordering
fn cmp(&self, other: &FoodWebLink) -> 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 FoodWebLink
impl PartialEq for FoodWebLink
Source§impl PartialOrd for FoodWebLink
impl PartialOrd for FoodWebLink
impl Eq for FoodWebLink
impl StructuralPartialEq for FoodWebLink
Auto Trait Implementations§
impl Freeze for FoodWebLink
impl RefUnwindSafe for FoodWebLink
impl Send for FoodWebLink
impl Sync for FoodWebLink
impl Unpin for FoodWebLink
impl UnsafeUnpin for FoodWebLink
impl UnwindSafe for FoodWebLink
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