pub struct PlatformFile { /* private fields */ }Implementations§
Source§impl PlatformFile
impl PlatformFile
pub fn from_path(name: impl Into<String>, path: impl Into<PathBuf>) -> Self
pub fn name(&self) -> &str
pub fn extension(&self) -> Option<&str>
pub fn mime_type(&self) -> Option<String>
pub fn source(&self) -> &FileSource
pub fn path(&self) -> Option<&Path>
pub fn uri(&self) -> Option<&str>
pub fn data(&self) -> Option<&Bytes>
pub fn size(&self) -> Option<u64>
pub fn read_bytes(&self) -> Result<Bytes, RlobKitError>
pub async fn read_bytes_async(&self) -> Result<Bytes, RlobKitError>
pub fn write_bytes(&self, data: &[u8]) -> Result<(), RlobKitError>
pub fn write_string(&self, s: &str) -> Result<(), RlobKitError>
pub fn builder(name: impl Into<String>) -> PlatformFileBuilder
Trait Implementations§
Source§impl Clone for PlatformFile
impl Clone for PlatformFile
Source§fn clone(&self) -> PlatformFile
fn clone(&self) -> PlatformFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlatformFile
impl Debug for PlatformFile
impl Eq for PlatformFile
Source§impl PartialEq for PlatformFile
impl PartialEq for PlatformFile
impl StructuralPartialEq for PlatformFile
Auto Trait Implementations§
impl !Freeze for PlatformFile
impl RefUnwindSafe for PlatformFile
impl Send for PlatformFile
impl Sync for PlatformFile
impl Unpin for PlatformFile
impl UnsafeUnpin for PlatformFile
impl UnwindSafe for PlatformFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more