pub struct SlackApiBlocksValidateError {
pub pointer: String,
pub code: SlackApiBlocksValidateErrorCode,
pub message: String,
pub constraint: Option<Value>,
pub field: Option<String>,
}Fields§
§pointer: StringJSON pointer to the invalid element, e.g. /blocks/0/child_blocks/0/type.
code: SlackApiBlocksValidateErrorCode§message: String§constraint: Option<Value>Shape depends on code, e.g. {"type":"enum","expected":[...],"got":"..."}.
field: Option<String>Implementations§
Source§impl SlackApiBlocksValidateError
impl SlackApiBlocksValidateError
Sourcepub fn new(
pointer: String,
code: SlackApiBlocksValidateErrorCode,
message: String,
) -> Self
pub fn new( pointer: String, code: SlackApiBlocksValidateErrorCode, message: String, ) -> Self
Creates a new SlackApiBlocksValidateError from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn pointer(&mut self, value: String) -> &mut Self
pub fn pointer(&mut self, value: String) -> &mut Self
Sets pointer to value.
JSON pointer to the invalid element, e.g. /blocks/0/child_blocks/0/type.
Sourcepub fn with_pointer(self, value: String) -> Self
pub fn with_pointer(self, value: String) -> Self
Returns self with pointer set to value.
JSON pointer to the invalid element, e.g. /blocks/0/child_blocks/0/type.
Sourcepub fn code(&mut self, value: SlackApiBlocksValidateErrorCode) -> &mut Self
pub fn code(&mut self, value: SlackApiBlocksValidateErrorCode) -> &mut Self
Sets code to value.
Sourcepub fn with_code(self, value: SlackApiBlocksValidateErrorCode) -> Self
pub fn with_code(self, value: SlackApiBlocksValidateErrorCode) -> Self
Returns self with code set to value.
Sourcepub fn with_message(self, value: String) -> Self
pub fn with_message(self, value: String) -> Self
Returns self with message set to value.
Sourcepub fn constraint(&mut self, value: Value) -> &mut Self
pub fn constraint(&mut self, value: Value) -> &mut Self
Sets constraint to Some(value).
Shape depends on code, e.g. {"type":"enum","expected":[...],"got":"..."}.
Sourcepub fn reset_constraint(&mut self) -> &mut Self
pub fn reset_constraint(&mut self) -> &mut Self
Sets constraint to None.
Shape depends on code, e.g. {"type":"enum","expected":[...],"got":"..."}.
Sourcepub fn mopt_constraint(&mut self, value: Option<Value>) -> &mut Self
pub fn mopt_constraint(&mut self, value: Option<Value>) -> &mut Self
Sets constraint to the given Option.
Shape depends on code, e.g. {"type":"enum","expected":[...],"got":"..."}.
Sourcepub fn with_constraint(self, value: Value) -> Self
pub fn with_constraint(self, value: Value) -> Self
Returns self with constraint set to Some(value).
Shape depends on code, e.g. {"type":"enum","expected":[...],"got":"..."}.
Sourcepub fn without_constraint(self) -> Self
pub fn without_constraint(self) -> Self
Returns self with constraint set to None.
Shape depends on code, e.g. {"type":"enum","expected":[...],"got":"..."}.
Sourcepub fn opt_constraint(self, value: Option<Value>) -> Self
pub fn opt_constraint(self, value: Option<Value>) -> Self
Returns self with constraint set to the given Option.
Shape depends on code, e.g. {"type":"enum","expected":[...],"got":"..."}.
Sourcepub fn reset_field(&mut self) -> &mut Self
pub fn reset_field(&mut self) -> &mut Self
Sets field to None.
Sourcepub fn mopt_field(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_field(&mut self, value: Option<String>) -> &mut Self
Sets field to the given Option.
Sourcepub fn with_field(self, value: String) -> Self
pub fn with_field(self, value: String) -> Self
Returns self with field set to Some(value).
Sourcepub fn without_field(self) -> Self
pub fn without_field(self) -> Self
Returns self with field set to None.