pub struct GenerateRandomBytesRequest {
pub mount: String,
pub bytes: Option<u32>,
pub format: OutputFormat,
pub source: RandomBytesSource,
}
Expand description
§Generate Random Bytes
This endpoint returns high-quality random bytes of the specified length.
- Path: {self.mount}/random(/{self.source})(/{self.bytes})
- Method: POST
- Response: GenerateRandomBytesResponse
- Reference: https://developer.hashicorp.com/vault/api-docs/secret/transit#generate-random-bytes
Fields§
§mount: String
§bytes: Option<u32>
Specifies the number of bytes to return. Default is 32.
format: OutputFormat
Specifies the output encoding.
source: RandomBytesSource
Specifies the source of the requested bytes.
Implementations§
Trait Implementations§
source§impl Debug for GenerateRandomBytesRequest
impl Debug for GenerateRandomBytesRequest
source§impl Default for GenerateRandomBytesRequest
impl Default for GenerateRandomBytesRequest
source§fn default() -> GenerateRandomBytesRequest
fn default() -> GenerateRandomBytesRequest
Returns the “default value” for a type. Read more
source§impl Endpoint for GenerateRandomBytesRequest
impl Endpoint for GenerateRandomBytesRequest
source§const REQUEST_BODY_TYPE: RequestType = RequestType::JSON
const REQUEST_BODY_TYPE: RequestType = RequestType::JSON
The content type of the request body
source§const RESPONSE_BODY_TYPE: ResponseType = ResponseType::JSON
const RESPONSE_BODY_TYPE: ResponseType = ResponseType::JSON
The content type of the response body
source§type Response = GenerateRandomBytesResponse
type Response = GenerateRandomBytesResponse
The type that the raw response from executing this endpoint will
deserialized into. This type is passed on to the EndpointResult and is
used to determine the type returned when the
parse()
method is called.source§fn path(&self) -> String
fn path(&self) -> String
The relative URL path that represents the location of this Endpoint.
This is combined with the base URL from a
Client instance to create the fully qualified
URL.
source§fn method(&self) -> RequestMethod
fn method(&self) -> RequestMethod
The HTTP method to be used when executing this Endpoint.
source§fn body(&self) -> Result<Option<Vec<u8>>, ClientError>
fn body(&self) -> Result<Option<Vec<u8>>, ClientError>
Optional data to add to the body of the request.
source§fn query(&self) -> Result<Option<String>, ClientError>
fn query(&self) -> Result<Option<String>, ClientError>
Optional query parameters to add to the request.
source§fn url(&self, base: &str) -> Result<Uri, ClientError>
fn url(&self, base: &str) -> Result<Uri, ClientError>
Returns the full URL address of the endpoint using the base address.
source§fn request(&self, base: &str) -> Result<Request<Vec<u8>>, ClientError>
fn request(&self, base: &str) -> Result<Request<Vec<u8>>, ClientError>
Returns a Request containing all data necessary to execute against
this endpoint.
source§fn exec<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 (impl Client + 'async_trait),
) -> Pin<Box<dyn Future<Output = Result<EndpointResult<Self::Response>, ClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn exec<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 (impl Client + 'async_trait),
) -> Pin<Box<dyn Future<Output = Result<EndpointResult<Self::Response>, ClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Executes the Endpoint using the given Client.
fn with_middleware<M>(self, middleware: &M) -> MutatedEndpoint<'_, Self, M>where
M: MiddleWare,
Auto Trait Implementations§
impl Freeze for GenerateRandomBytesRequest
impl RefUnwindSafe for GenerateRandomBytesRequest
impl Send for GenerateRandomBytesRequest
impl Sync for GenerateRandomBytesRequest
impl Unpin for GenerateRandomBytesRequest
impl UnwindSafe for GenerateRandomBytesRequest
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