[−][src]Struct safe_app::nfs::File
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]
fn deserialize<__D>(
__deserializer: __D
) -> Result<File, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<File, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for File
[src]
impl Ord for File
[src]
fn cmp(&self, other: &File) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<File> for File
[src]
impl PartialOrd<File> for File
[src]
fn partial_cmp(&self, other: &File) -> Option<Ordering>
[src]
fn lt(&self, other: &File) -> bool
[src]
fn le(&self, other: &File) -> bool
[src]
fn gt(&self, other: &File) -> bool
[src]
fn ge(&self, other: &File) -> bool
[src]
impl ReprC for File
[src]
type C = *const File
C representation of the type.
type Error = NfsError
Error type.
unsafe fn clone_from_repr_c(
repr_c: <File as ReprC>::C
) -> Result<File, <File as ReprC>::Error>
[src]
repr_c: <File as ReprC>::C
) -> Result<File, <File as ReprC>::Error>
impl Serialize for File
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,