Struct primitives::CampaignId
source · pub struct CampaignId(_);
Expand description
an Id of 16 bytes, (de)serialized as a 0x
prefixed hex
In this implementation of the CampaignId
the value is generated from a Uuid::new_v4().to_simple()
Implementations
Trait Implementations
sourceimpl AsRef<[u8; 16]> for CampaignId
impl AsRef<[u8; 16]> for CampaignId
sourceimpl AsRef<[u8]> for CampaignId
impl AsRef<[u8]> for CampaignId
sourceimpl Clone for CampaignId
impl Clone for CampaignId
sourcefn clone(&self) -> CampaignId
fn clone(&self) -> CampaignId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CampaignId
impl Debug for CampaignId
sourceimpl Default for CampaignId
impl Default for CampaignId
sourceimpl<'de> Deserialize<'de> for CampaignId
impl<'de> Deserialize<'de> for CampaignId
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for CampaignId
impl Display for CampaignId
sourceimpl From<&Row> for CampaignId
impl From<&Row> for CampaignId
sourceimpl<'a> FromSql<'a> for CampaignId
impl<'a> FromSql<'a> for CampaignId
sourcefn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresourcefn 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 moresourceimpl FromStr for CampaignId
impl FromStr for CampaignId
sourceimpl Hash for CampaignId
impl Hash for CampaignId
sourceimpl PartialEq<CampaignId> for CampaignId
impl PartialEq<CampaignId> for CampaignId
sourcefn eq(&self, other: &CampaignId) -> bool
fn eq(&self, other: &CampaignId) -> bool
sourceimpl Serialize for CampaignId
impl Serialize for CampaignId
sourceimpl ToSql for CampaignId
impl ToSql for CampaignId
sourcefn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read moresourcefn 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 moresourcefn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
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 CampaignId
impl Eq for CampaignId
impl StructuralEq for CampaignId
impl StructuralPartialEq for CampaignId
Auto Trait Implementations
impl RefUnwindSafe for CampaignId
impl Send for CampaignId
impl Sync for CampaignId
impl Unpin for CampaignId
impl UnwindSafe for CampaignId
Blanket Implementations
impl<T, U> AsByteSlice<T> for Uwhere
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
impl<T, U> AsByteSlice<T> for Uwhere
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
fn as_byte_slice(&self) -> &[u8] ⓘ
impl<U> AsSliceOf for Uwhere
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for Uwhere
U: AsRef<[u8]> + ?Sized,
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
T: FromByteSlice,
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<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read moresourcefn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more