Struct pgx_utils::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
sourceimpl 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
sourceimpl Clone for ToSqlConfig
impl Clone for ToSqlConfig
sourcefn clone(&self) -> ToSqlConfig
fn clone(&self) -> ToSqlConfig
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ToSqlConfig
impl Debug for ToSqlConfig
sourceimpl Default for ToSqlConfig
impl Default for ToSqlConfig
sourceimpl From<LitStr> for ToSqlConfig
impl From<LitStr> for ToSqlConfig
sourceimpl From<Path> for ToSqlConfig
impl From<Path> for ToSqlConfig
sourceimpl From<bool> for ToSqlConfig
impl From<bool> for ToSqlConfig
sourceimpl Hash for ToSqlConfig
impl Hash for ToSqlConfig
sourceimpl PartialEq<ToSqlConfig> for ToSqlConfig
impl PartialEq<ToSqlConfig> for ToSqlConfig
sourcefn eq(&self, other: &ToSqlConfig) -> bool
fn eq(&self, other: &ToSqlConfig) -> bool
sourceimpl ToTokens for ToSqlConfig
impl ToTokens for ToSqlConfig
sourcefn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
sourcefn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
sourcefn into_token_stream(self) -> TokenStream
fn into_token_stream(self) -> TokenStream
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
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<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.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>
sourceimpl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
sourcefn 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. Read more