Struct cedar_policy_cli::RequestArgs
source · pub struct RequestArgs {
pub principal: Option<String>,
pub action: Option<String>,
pub resource: Option<String>,
pub context_json_file: Option<String>,
pub request_json_file: Option<String>,
}Expand description
This struct contains the arguments that together specify a request.
Fields§
§principal: Option<String>Principal for the request, e.g., User::“alice”
action: Option<String>Action for the request, e.g., Action::“view”
resource: Option<String>Resource for the request, e.g., File::“myfile.txt”
context_json_file: Option<String>File containing a JSON object representing the context for the request. Should be a (possibly empty) map from keys to values.
request_json_file: Option<String>File containing a JSON object representing the entire request. Must have fields “principal”, “action”, “resource”, and “context”, where “context” is a (possibly empty) map from keys to values. This option replaces –principal, –action, etc.
Trait Implementations§
source§impl Args for RequestArgs
impl Args for RequestArgs
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentssource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
source§impl Debug for RequestArgs
impl Debug for RequestArgs
source§impl FromArgMatches for RequestArgs
impl FromArgMatches for RequestArgs
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches to self.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl RefUnwindSafe for RequestArgs
impl Send for RequestArgs
impl Sync for RequestArgs
impl Unpin for RequestArgs
impl UnwindSafe for RequestArgs
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