Type Alias hedera::FileUpdateTransaction
source · pub type FileUpdateTransaction = Transaction<FileUpdateTransactionData>;
Expand description
Modify the metadata and/or the contents of a file.
If a field is not set in the transaction body, the corresponding file attribute will be unchanged.
Aliased Type§
struct FileUpdateTransaction { /* private fields */ }
Implementations§
source§impl FileUpdateTransaction
impl FileUpdateTransaction
sourcepub fn get_file_id(&self) -> Option<FileId>
pub fn get_file_id(&self) -> Option<FileId>
Returns the ID of the file which is being updated.
sourcepub fn file_id(&mut self, id: impl Into<FileId>) -> &mut Self
pub fn file_id(&mut self, id: impl Into<FileId>) -> &mut Self
Sets the ID of the file which is being updated.
sourcepub fn get_file_memo(&self) -> Option<&str>
pub fn get_file_memo(&self) -> Option<&str>
Returns the new memo for the file.
sourcepub fn file_memo(&mut self, memo: impl Into<String>) -> &mut Self
pub fn file_memo(&mut self, memo: impl Into<String>) -> &mut Self
Sets the new memo to be associated with the file.
sourcepub fn get_contents(&self) -> Option<&[u8]>
pub fn get_contents(&self) -> Option<&[u8]>
Returns the bytes that are to be the contents of the file.
sourcepub fn contents(&mut self, contents: Vec<u8>) -> &mut Self
pub fn contents(&mut self, contents: Vec<u8>) -> &mut Self
Sets the bytes that are to be the contents of the file.
sourcepub fn keys<K: Into<Key>>(
&mut self,
keys: impl IntoIterator<Item = K>
) -> &mut Self
pub fn keys<K: Into<Key>>( &mut self, keys: impl IntoIterator<Item = K> ) -> &mut Self
Sets the keys for this file.
All keys at the top level of a key list must sign to create or modify the file. Any one of the keys at the top level key list can sign to delete the file.
sourcepub fn get_expiration_time(&self) -> Option<OffsetDateTime>
pub fn get_expiration_time(&self) -> Option<OffsetDateTime>
Returns the time at which this file should expire.
sourcepub fn expiration_time(&mut self, at: OffsetDateTime) -> &mut Self
pub fn expiration_time(&mut self, at: OffsetDateTime) -> &mut Self
Sets the time at which this file should expire.
sourcepub fn get_auto_renew_account_id(&self) -> Option<AccountId>
pub fn get_auto_renew_account_id(&self) -> Option<AccountId>
Returns the account to be used at the file’s expiration time to extend the life of the file.
§Network Support
Please note that this not supported on any hedera network at this time.
sourcepub fn auto_renew_account_id(&mut self, id: AccountId) -> &mut Self
pub fn auto_renew_account_id(&mut self, id: AccountId) -> &mut Self
Sets the account to be used at the files’s expiration time to extend the life of the file.
§Network Support
Please note that this not supported on any hedera network at this time.
sourcepub fn get_auto_renew_period(&self) -> Option<Duration>
pub fn get_auto_renew_period(&self) -> Option<Duration>
Returns the auto renew period for this file.
§Network Support
Please note that this not supported on any hedera network at this time.
sourcepub fn auto_renew_period(&mut self, duration: Duration) -> &mut Self
pub fn auto_renew_period(&mut self, duration: Duration) -> &mut Self
Sets the auto renew period for this file.
§Network Support
Please note that this not supported on any hedera network at this time.