pub struct ToSqlConfig {
pub enabled: bool,
pub callback: Option<Path>,
pub content: Option<LitStr>,
}
Expand description
A parsed sql
option from a pgrx
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 for ToSqlConfig
impl PartialEq for ToSqlConfig
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 StructuralPartialEq for ToSqlConfig
Auto Trait Implementations§
impl Freeze for ToSqlConfig
impl RefUnwindSafe for ToSqlConfig
impl !Send for ToSqlConfig
impl !Sync for ToSqlConfig
impl Unpin for ToSqlConfig
impl UnwindSafe for ToSqlConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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.