Struct teaclave_types::StagedFileInfo
source · [−]pub struct StagedFileInfo {
pub path: PathBuf,
pub crypto_info: TeaclaveFile128Key,
pub cmac: FileAuthTag,
}
Fields
path: PathBuf
crypto_info: TeaclaveFile128Key
cmac: FileAuthTag
Implementations
sourceimpl StagedFileInfo
impl StagedFileInfo
pub fn new(
path: impl AsRef<Path>,
crypto_info: TeaclaveFile128Key,
cmac: impl Into<FileAuthTag>
) -> Self
pub fn create_readable_io(&self) -> Result<Box<dyn Read>>
pub fn create_writable_io(&self) -> Result<Box<dyn Write>>
pub fn convert_for_uploading(
&self,
dst: impl AsRef<Path>,
crypto_info: FileCrypto
) -> Result<FileAuthTag>
pub fn convert_to_teaclave_file(
&self,
dst: impl AsRef<Path>,
crypto: TeaclaveFile128Key
) -> Result<FileAuthTag>
pub fn create_with_plaintext_file(
path: impl AsRef<Path>
) -> Result<StagedFileInfo>
pub fn get_plaintext(&self) -> Result<Vec<u8>>
pub fn create_with_bytes(
path: impl AsRef<Path>,
bytes: &[u8]
) -> Result<StagedFileInfo>
Trait Implementations
sourceimpl Clone for StagedFileInfo
impl Clone for StagedFileInfo
sourcefn clone(&self) -> StagedFileInfo
fn clone(&self) -> StagedFileInfo
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for StagedFileInfo
impl Debug for StagedFileInfo
sourceimpl Default for StagedFileInfo
impl Default for StagedFileInfo
sourcefn default() -> StagedFileInfo
fn default() -> StagedFileInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for StagedFileInfo
impl Send for StagedFileInfo
impl Sync for StagedFileInfo
impl Unpin for StagedFileInfo
impl UnwindSafe for StagedFileInfo
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more