pub struct Validation;
Expand description
Validation utilities
Implementations§
Source§impl Validation
impl Validation
Sourcepub fn is_dark_domain(domain: &str) -> bool
pub fn is_dark_domain(domain: &str) -> bool
Validate a dark domain name
Sourcepub fn is_peer_address(address: &str) -> bool
pub fn is_peer_address(address: &str) -> bool
Validate a peer address
Sourcepub fn is_valid_hex(hex: &str) -> bool
pub fn is_valid_hex(hex: &str) -> bool
Validate a hex string
Trait Implementations§
Source§impl From<Validation> for JsValue
impl From<Validation> for JsValue
Source§fn from(value: Validation) -> Self
fn from(value: Validation) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for Validation
impl FromWasmAbi for Validation
Source§impl IntoWasmAbi for Validation
impl IntoWasmAbi for Validation
Source§impl LongRefFromWasmAbi for Validation
impl LongRefFromWasmAbi for Validation
Source§impl OptionFromWasmAbi for Validation
impl OptionFromWasmAbi for Validation
Source§impl OptionIntoWasmAbi for Validation
impl OptionIntoWasmAbi for Validation
Source§impl RefFromWasmAbi for Validation
impl RefFromWasmAbi for Validation
Source§type Anchor = RcRef<Validation>
type Anchor = RcRef<Validation>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for Validation
impl RefMutFromWasmAbi for Validation
Source§impl TryFromJsValue for Validation
impl TryFromJsValue for Validation
Source§impl VectorFromWasmAbi for Validation
impl VectorFromWasmAbi for Validation
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Validation]>
Source§impl VectorIntoJsValue for Validation
impl VectorIntoJsValue for Validation
fn vector_into_jsvalue(vector: Box<[Validation]>) -> JsValue
Source§impl VectorIntoWasmAbi for Validation
impl VectorIntoWasmAbi for Validation
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Validation]>) -> Self::Abi
Source§impl WasmDescribeVector for Validation
impl WasmDescribeVector for Validation
impl SupportsConstructor for Validation
impl SupportsInstanceProperty for Validation
impl SupportsStaticProperty for Validation
Auto Trait Implementations§
impl Freeze for Validation
impl RefUnwindSafe for Validation
impl Send for Validation
impl Sync for Validation
impl Unpin for Validation
impl UnwindSafe for Validation
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.