Struct pgx_utils::sql_entity_graph::ControlFile
source · [−]pub struct ControlFile {
pub comment: String,
pub default_version: String,
pub module_pathname: Option<String>,
pub relocatable: bool,
pub superuser: bool,
pub schema: Option<String>,
}
Expand description
The parsed contents of a .control
file.
use pgx_utils::sql_entity_graph::ControlFile;
use std::convert::TryFrom;
let context = include_str!("../../../pgx-examples/custom_types/custom_types.control");
let _control_file = ControlFile::try_from(context)?;
Fields
comment: String
default_version: String
module_pathname: Option<String>
relocatable: bool
superuser: bool
schema: Option<String>
Implementations
Trait Implementations
sourceimpl Clone for ControlFile
impl Clone for ControlFile
sourcefn clone(&self) -> ControlFile
fn clone(&self) -> ControlFile
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 ControlFile
impl Debug for ControlFile
sourceimpl From<ControlFile> for SqlGraphEntity
impl From<ControlFile> for SqlGraphEntity
sourcefn from(val: ControlFile) -> Self
fn from(val: ControlFile) -> Self
Converts to this type from the input type.
sourceimpl Hash for ControlFile
impl Hash for ControlFile
sourceimpl Ord for ControlFile
impl Ord for ControlFile
sourcefn cmp(&self, other: &ControlFile) -> Ordering
fn cmp(&self, other: &ControlFile) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ControlFile> for ControlFile
impl PartialEq<ControlFile> for ControlFile
sourcefn eq(&self, other: &ControlFile) -> bool
fn eq(&self, other: &ControlFile) -> bool
sourceimpl PartialOrd<ControlFile> for ControlFile
impl PartialOrd<ControlFile> for ControlFile
sourcefn partial_cmp(&self, other: &ControlFile) -> Option<Ordering>
fn partial_cmp(&self, other: &ControlFile) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl SqlGraphIdentifier for ControlFile
impl SqlGraphIdentifier for ControlFile
sourceimpl ToSql for ControlFile
impl ToSql for ControlFile
sourceimpl TryFrom<&str> for ControlFile
impl TryFrom<&str> for ControlFile
impl Eq for ControlFile
impl StructuralEq for ControlFile
impl StructuralPartialEq for ControlFile
Auto Trait Implementations
impl RefUnwindSafe for ControlFile
impl Send for ControlFile
impl Sync for ControlFile
impl Unpin for ControlFile
impl UnwindSafe for ControlFile
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.