pub struct BondDescriptor(/* private fields */);Expand description
A lightweight bond descriptor or reference label.
Implementations§
Source§impl BondDescriptor
impl BondDescriptor
Sourcepub fn new(descriptor: &str) -> Result<Self, BondValidationError>
pub fn new(descriptor: &str) -> Result<Self, BondValidationError>
Creates a bond descriptor.
§Errors
Returns BondValidationError::EmptyDescriptor when descriptor is empty after trimming.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the descriptor and returns the owned text.
Trait Implementations§
Source§impl AsRef<str> for BondDescriptor
impl AsRef<str> for BondDescriptor
Source§impl Clone for BondDescriptor
impl Clone for BondDescriptor
Source§fn clone(&self) -> BondDescriptor
fn clone(&self) -> BondDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BondDescriptor
impl Debug for BondDescriptor
Source§impl Display for BondDescriptor
impl Display for BondDescriptor
Source§impl Hash for BondDescriptor
impl Hash for BondDescriptor
Source§impl Ord for BondDescriptor
impl Ord for BondDescriptor
Source§fn cmp(&self, other: &BondDescriptor) -> Ordering
fn cmp(&self, other: &BondDescriptor) -> Ordering
1.21.0 (const: unstable) · 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 BondDescriptor
impl PartialEq for BondDescriptor
Source§fn eq(&self, other: &BondDescriptor) -> bool
fn eq(&self, other: &BondDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BondDescriptor
impl PartialOrd for BondDescriptor
Source§impl TryFrom<&str> for BondDescriptor
impl TryFrom<&str> for BondDescriptor
impl Eq for BondDescriptor
impl StructuralPartialEq for BondDescriptor
Auto Trait Implementations§
impl Freeze for BondDescriptor
impl RefUnwindSafe for BondDescriptor
impl Send for BondDescriptor
impl Sync for BondDescriptor
impl Unpin for BondDescriptor
impl UnsafeUnpin for BondDescriptor
impl UnwindSafe for BondDescriptor
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