Struct svc_storage::resources::base::ResourceDefinition
source · pub struct ResourceDefinition {
pub psql_table: String,
pub psql_id_cols: Vec<String>,
pub fields: HashMap<String, FieldDefinition>,
}
Expand description
struct object defining resource metadata
Fields§
§psql_table: String
psql table corresponding to the resource
psql_id_cols: Vec<String>
psql column names used to identify the unique resource in the database
fields: HashMap<String, FieldDefinition>
resource fields definition
Implementations§
source§impl ResourceDefinition
impl ResourceDefinition
sourcepub fn get_psql_table(&self) -> String
pub fn get_psql_table(&self) -> String
returns String
value of the struct’s psql_table
field
sourcepub fn get_psql_id_cols(&self) -> Vec<String>
pub fn get_psql_id_cols(&self) -> Vec<String>
returns Vec<String>
value of the struct’s psql_table_ids
field
sourcepub fn try_get_field(&self, field: &str) -> Result<&FieldDefinition, ArrErr>
pub fn try_get_field(&self, field: &str) -> Result<&FieldDefinition, ArrErr>
returns FieldDefinition
if the provided field
is found in the fields
HashMap
returns an ArrErr
if the field does not exist
Trait Implementations§
source§impl Clone for ResourceDefinition
impl Clone for ResourceDefinition
source§fn clone(&self) -> ResourceDefinition
fn clone(&self) -> ResourceDefinition
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 moreAuto Trait Implementations§
impl RefUnwindSafe for ResourceDefinition
impl Send for ResourceDefinition
impl Sync for ResourceDefinition
impl Unpin for ResourceDefinition
impl UnwindSafe for ResourceDefinition
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
§impl<T> CloneAny for T
impl<T> CloneAny for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request