pub struct EffectName(/* private fields */);Expand description
The type of an effect, e.g. payment.charge.
Implementations§
Source§impl EffectName
impl EffectName
Sourcepub fn new(name: impl Into<String>) -> Result<EffectName, IdentityError>
pub fn new(name: impl Into<String>) -> Result<EffectName, IdentityError>
Validates and wraps a name.
§Errors
Rejects empty names, names over MAX_NAME_LEN bytes and names
containing control characters.
Trait Implementations§
Source§impl Clone for EffectName
impl Clone for EffectName
Source§fn clone(&self) -> EffectName
fn clone(&self) -> EffectName
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 EffectName
impl Debug for EffectName
Source§impl<'de> Deserialize<'de> for EffectName
impl<'de> Deserialize<'de> for EffectName
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EffectName, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EffectName, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EffectName
impl Display for EffectName
impl Eq for EffectName
Source§impl Hash for EffectName
impl Hash for EffectName
Source§impl Ord for EffectName
impl Ord for EffectName
Source§fn cmp(&self, other: &EffectName) -> Ordering
fn cmp(&self, other: &EffectName) -> 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for EffectName
impl PartialEq for EffectName
Source§impl PartialOrd for EffectName
impl PartialOrd for EffectName
Source§impl Serialize for EffectName
impl Serialize for EffectName
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for EffectName
Source§impl TryFrom<String> for EffectName
impl TryFrom<String> for EffectName
Source§type Error = IdentityError
type Error = IdentityError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<EffectName, <EffectName as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<EffectName, <EffectName as TryFrom<String>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for EffectName
impl RefUnwindSafe for EffectName
impl Send for EffectName
impl Sync for EffectName
impl Unpin for EffectName
impl UnsafeUnpin for EffectName
impl UnwindSafe for EffectName
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