pub struct AddressMapping {
pub from: String,
pub to: String,
pub transform: Option<ValueTransform>,
}Expand description
Maps between protocol addresses and Clasp addresses
Fields§
§from: StringProtocol address pattern
to: StringClasp address pattern
transform: Option<ValueTransform>Value transformation
Implementations§
Source§impl AddressMapping
impl AddressMapping
pub fn new(from: &str, to: &str) -> Self
pub fn with_transform(self, transform: ValueTransform) -> Self
Sourcepub fn map_address(&self, addr: &str) -> Option<String>
pub fn map_address(&self, addr: &str) -> Option<String>
Apply mapping to convert protocol address to Clasp address
Trait Implementations§
Source§impl Clone for AddressMapping
impl Clone for AddressMapping
Source§fn clone(&self) -> AddressMapping
fn clone(&self) -> AddressMapping
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 moreAuto Trait Implementations§
impl Freeze for AddressMapping
impl RefUnwindSafe for AddressMapping
impl Send for AddressMapping
impl Sync for AddressMapping
impl Unpin for AddressMapping
impl UnsafeUnpin for AddressMapping
impl UnwindSafe for AddressMapping
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