Struct pgx_sql_entity_graph::ToSqlConfig 
source · pub struct ToSqlConfig {
    pub enabled: bool,
    pub callback: Option<Path>,
    pub content: Option<LitStr>,
}Expand description
A parsed sql option from a pgx related procedural macro.
Fields§
§enabled: bool§callback: Option<Path>§content: Option<LitStr>Implementations§
source§impl ToSqlConfig
 
impl ToSqlConfig
sourcepub fn from_attribute(attr: &Attribute) -> Result<Option<Self>, Error>
 
pub fn from_attribute(attr: &Attribute) -> Result<Option<Self>, Error>
Used for general purpose parsing from an attribute
sourcepub fn from_attributes(attrs: &[Attribute]) -> Result<Option<Self>, Error>
 
pub fn from_attributes(attrs: &[Attribute]) -> Result<Option<Self>, Error>
Used to parse a generator config from a set of item attributes
pub fn overrides_default(&self) -> bool
Trait Implementations§
source§impl Clone for ToSqlConfig
 
impl Clone for ToSqlConfig
source§fn clone(&self) -> ToSqlConfig
 
fn clone(&self) -> ToSqlConfig
Returns a copy 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 moresource§impl Debug for ToSqlConfig
 
impl Debug for ToSqlConfig
source§impl Default for ToSqlConfig
 
impl Default for ToSqlConfig
source§impl From<LitStr> for ToSqlConfig
 
impl From<LitStr> for ToSqlConfig
source§impl From<Path> for ToSqlConfig
 
impl From<Path> for ToSqlConfig
source§impl From<bool> for ToSqlConfig
 
impl From<bool> for ToSqlConfig
source§impl Hash for ToSqlConfig
 
impl Hash for ToSqlConfig
source§impl PartialEq<ToSqlConfig> for ToSqlConfig
 
impl PartialEq<ToSqlConfig> for ToSqlConfig
source§fn eq(&self, other: &ToSqlConfig) -> bool
 
fn eq(&self, other: &ToSqlConfig) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl ToTokens for ToSqlConfig
 
impl ToTokens for ToSqlConfig
source§fn to_tokens(&self, tokens: &mut TokenStream2)
 
fn to_tokens(&self, tokens: &mut TokenStream2)
source§fn to_token_stream(&self) -> TokenStream
 
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
    Self: Sized,
 
fn into_token_stream(self) -> TokenStreamwhere
    Self: Sized,
impl Eq for ToSqlConfig
impl StructuralEq for ToSqlConfig
impl StructuralPartialEq for ToSqlConfig
Auto Trait Implementations§
impl RefUnwindSafe for ToSqlConfig
impl !Send for ToSqlConfig
impl !Sync for ToSqlConfig
impl Unpin for ToSqlConfig
impl UnwindSafe for ToSqlConfig
Blanket Implementations§
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.source§impl<T> Instrument for T
 
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Spanned for Twhere
    T: Spanned + ?Sized,
 
impl<T> Spanned for Twhere
    T: Spanned + ?Sized,
source§fn span(&self) -> Span
 
fn span(&self) -> Span
Returns a 
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.