Struct BondDescriptor
pub struct BondDescriptor(/* private fields */);Expand description
A lightweight bond descriptor or reference label.
Implementations§
§impl BondDescriptor
impl BondDescriptor
pub fn new(descriptor: &str) -> Result<BondDescriptor, BondValidationError>
pub fn new(descriptor: &str) -> Result<BondDescriptor, BondValidationError>
Creates a bond descriptor.
§Errors
Returns BondValidationError::EmptyDescriptor when descriptor is empty after trimming.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the descriptor and returns the owned text.
Trait Implementations§
§impl AsRef<str> for BondDescriptor
impl AsRef<str> for BondDescriptor
§impl Clone for BondDescriptor
impl Clone for BondDescriptor
§fn clone(&self) -> BondDescriptor
fn clone(&self) -> BondDescriptor
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 more§impl Debug for BondDescriptor
impl Debug for BondDescriptor
§impl Display for BondDescriptor
impl Display for BondDescriptor
§impl Hash for BondDescriptor
impl Hash for BondDescriptor
§impl Ord for BondDescriptor
impl Ord for BondDescriptor
§impl PartialEq for BondDescriptor
impl PartialEq for BondDescriptor
§impl PartialOrd for BondDescriptor
impl PartialOrd for BondDescriptor
§impl TryFrom<&str> for BondDescriptor
impl TryFrom<&str> for BondDescriptor
§type Error = BondValidationError
type Error = BondValidationError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<BondDescriptor, <BondDescriptor as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<BondDescriptor, <BondDescriptor as TryFrom<&str>>::Error>
Performs the conversion.
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