Struct adapter::primitives::ChainId
pub struct ChainId(_);
Expand description
The Id of the chain
Ethereum Virtual Machine
For all the EVM-compatible Chain IDs visit https://chainid.network
Implementations
Trait Implementations
impl<'de> Deserialize<'de> for ChainId
impl<'de> Deserialize<'de> for ChainId
fn deserialize<__D>(
__deserializer: __D
) -> Result<ChainId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ChainId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a> FromSql<'a> for ChainId
impl<'a> FromSql<'a> for ChainId
fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<ChainId, Box<dyn Error + Sync + Send + 'static, Global>>
fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<ChainId, Box<dyn Error + Sync + Send + 'static, Global>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read morefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
. Read moreimpl Serialize for ChainId
impl Serialize for ChainId
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 ToSql for ChainId
impl ToSql for ChainId
fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send + 'static, Global>>
fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send + 'static, Global>>
Converts the value of
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read morefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type
. Read morefn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send + 'static, Global>>
fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send + 'static, Global>>
An adaptor method used internally by Rust-Postgres. Read more
sourcefn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
impl Copy for ChainId
impl Eq for ChainId
impl StructuralEq for ChainId
impl StructuralPartialEq for ChainId
Auto Trait Implementations
impl RefUnwindSafe for ChainId
impl Send for ChainId
impl Sync for ChainId
impl Unpin for ChainId
impl UnwindSafe for ChainId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
sourcefn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self
as a ToSql
trait object.sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.