[][src]Struct ssvm_container::storage::file_system::FileSystem

pub struct FileSystem { /* fields omitted */ }

A file object which facilitates CRUD style operations on the file system The default storage path is the calling user's home directory

Methods

impl FileSystem[src]

pub fn init() -> FileSystem[src]

Name

init

Purpose

Initialises a SSVMContainer file system object

Input

N/A

Returns

FileSystem object

Example

let fs = ssvm_container::storage::file_system::FileSystem::init();

pub fn create_application(&self, _bytecode_wasm: &str) -> String[src]

Name

create_application

Purpose

Store Wasm on the file system so that it's funtions can be executed later

Input

An instance of the FileSystem object A complete .wasm file in string format

Returns

A unique identifier which can be used to access the application later

Example

let bytecode_wasm = String::from("0x1234567890"); let uuid = ssvm_container::storage::file_system::FileSystem::create_application(&fs, &bytecode_wasm);

pub fn read_application(&self, _application_uuid: &str) -> String[src]

Name

read_application

Purpose

Read the Wasm of a given application

Input

An instance of the FileSystem object An application's uuid as a string

Returns

A complete .wasm file's contents, as a string

Example

let bytecode_wasm_string = ssvm_container::storage::file_system::FileSystem::read_application(&fs, &uuid);

pub fn update_application(
    &self,
    _application_uuid: &str,
    _bytecode_wasm: &str
) -> String
[src]

Name

update_application

Purpose

Update the Wasm of a given application (overrides existing .wasm file)

Input

An instance of the FileSystem object A complete .wasm file in string format

Returns

A unique identifier which can be used to access the application later

Example

ssvm_container::storage::file_system::FileSystem::update_application(&fs, &uuid, &bytecode_wasm_update);

pub fn delete_application(&self, _application_uuid: &str) -> String[src]

Name

delete_application

Purpose

Delete the application from the file system alltogether

Input

An application's uuid as a string

Returns

The application uuid of the application that was deleted

Example

ssvm_container::storage::file_system::FileSystem::delete_application(&fs, &uuid);

Trait Implementations

impl Debug for FileSystem[src]

Auto Trait Implementations

impl Send for FileSystem

impl Unpin for FileSystem

impl Sync for FileSystem

impl UnwindSafe for FileSystem

impl RefUnwindSafe for FileSystem

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]