[][src]Struct safe_app::nfs::File

pub struct File { /* fields omitted */ }

Representation of a File to be put into the network. Could be any kind of file: text, music, video, etc.

Methods

impl File[src]

pub fn new(user_metadata: Vec<u8>, published: bool) -> File[src]

Create a new instance of FileMetadata

pub fn into_repr_c(self) -> File[src]

Construct FFI wrapper for the native Rust object, consuming self.

pub fn created_time(&self) -> &DateTime<Utc>[src]

Get time of creation

pub fn modified_time(&self) -> &DateTime<Utc>[src]

Get time of modification

pub fn data_map_name(&self) -> &XorName[src]

Get the network name of the data containing the data-map of the File

pub fn size(&self) -> u64[src]

Get size information

pub fn user_metadata(&self) -> &[u8][src]

Get user setteble custom metadata

pub fn published(&self) -> bool[src]

Get published status of a file

pub fn data_address(&self) -> Address[src]

Get the Immutable Data address of the file

pub fn set_data_map_name(&mut self, datamap_name: XorName)[src]

Set the data-map name of the File

pub fn set_size(&mut self, size: u64)[src]

Set the size of file

pub fn set_created_time(&mut self, created_time: DateTime<Utc>)[src]

Set time of creation

pub fn set_modified_time(&mut self, modified_time: DateTime<Utc>)[src]

Set time of modification

pub fn set_user_metadata(&mut self, user_metadata: Vec<u8>)[src]

User setteble metadata for custom metadata

Trait Implementations

impl Clone for File[src]

impl Debug for File[src]

impl<'de> Deserialize<'de> for File[src]

impl Eq for File[src]

impl Ord for File[src]

impl PartialEq<File> for File[src]

impl PartialOrd<File> for File[src]

impl ReprC for File[src]

type C = *const File

C representation of the type.

type Error = NfsError

Error type.

impl Serialize for File[src]

impl StructuralEq for File[src]

impl StructuralPartialEq for File[src]

Auto Trait Implementations

impl RefUnwindSafe for File

impl Send for File

impl Sync for File

impl Unpin for File

impl UnwindSafe for File

Blanket Implementations

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

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

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

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,