pub struct WebCOwned {
pub webc: WebC<'static>,
/* private fields */
}
v1
only.Expand description
Owned version of the WebC file that carries its data
along the parsed WebC<'static>
Fields§
§webc: WebC<'static>
Implementations§
Methods from Deref<Target = WebC<'static>>§
pub fn get_main_args_for_command( &self, command: &str, ) -> Result<Vec<String>, String>
pub fn get_atom_name_for_command( &self, api: &str, command: &str, ) -> Result<String, String>
Sourcepub fn get_volumes_for_package(&self, package: &str) -> Vec<String>
pub fn get_volumes_for_package(&self, package: &str) -> Vec<String>
Determines the available volumes for a given package
pub fn list_directories(&self, volume: &str) -> Vec<String>
Sourcepub fn read_dir(
&self,
package: &str,
path: &str,
) -> Result<Vec<FsEntry<'a>>, Error>
pub fn read_dir( &self, package: &str, path: &str, ) -> Result<Vec<FsEntry<'a>>, Error>
Returns the directory entries or an error if the directory does not exist
Sourcepub fn get_file_entry(
&self,
package: &str,
path: &str,
) -> Option<(String, OwnedFsEntryFile)>
pub fn get_file_entry( &self, package: &str, path: &str, ) -> Option<(String, OwnedFsEntryFile)>
Looks for the first volume containing “entry”, scoped to the given package
Sourcepub fn get_metadata(&self) -> &Manifest
pub fn get_metadata(&self) -> &Manifest
Returns a reference to the manifest
Sourcepub fn get_package_name(&self) -> String
pub fn get_package_name(&self) -> String
Returns the current package name with
Sourcepub fn get_atom(&self, package: &str, atom: &str) -> Result<&[u8], Error>
pub fn get_atom(&self, package: &str, atom: &str) -> Result<&[u8], Error>
Returns an atom by name for a given package
Sourcepub fn get_volume(&self, package: &str, volume: &str) -> Option<&Volume<'a>>
pub fn get_volume(&self, package: &str, volume: &str) -> Option<&Volume<'a>>
Returns a reference to the filesystem volume of the package
Sourcepub fn get_file(&self, package: &str, file_path: &str) -> Result<&[u8], Error>
pub fn get_file(&self, package: &str, file_path: &str) -> Result<&[u8], Error>
Returns a file for a given package - if you want to use a non-default
volume, prefix the file_path
with volume://
, for example, metadata://README.md
Sourcepub fn list_volumes(&self, package: &str) -> Vec<String>
pub fn list_volumes(&self, package: &str) -> Vec<String>
Returns a list of volumes for this package
Sourcepub fn list_packages(&self) -> Vec<PackageInfo>
pub fn list_packages(&self) -> Vec<PackageInfo>
Returns a list of bundled “package@version” strings contained in this package
Sourcepub fn list_atoms(&self) -> Vec<String>
pub fn list_atoms(&self) -> Vec<String>
Returns the atoms in the root package
Sourcepub fn get_all_atoms(&self) -> IndexMap<String, &'a [u8]>
pub fn get_all_atoms(&self) -> IndexMap<String, &'a [u8]>
Returns a list of all atoms with bytes
Sourcepub fn list_atoms_for_package(&self, package_orig: &str) -> Vec<String>
pub fn list_atoms_for_package(&self, package_orig: &str) -> Vec<String>
List the atoms for a given package
Sourcepub fn list_commands(&self) -> Vec<&str>
pub fn list_commands(&self) -> Vec<&str>
List the available commands for the root package
pub fn get_volumes_as_fileblock(&self) -> Vec<u8> ⓘ
Sourcepub fn into_bytes(&self, sign_bytes: GenerateChecksum) -> ReadResult<Vec<u8>>
pub fn into_bytes(&self, sign_bytes: GenerateChecksum) -> ReadResult<Vec<u8>>
Serialize the .webc file into bytes
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WebCOwned
impl RefUnwindSafe for WebCOwned
impl Send for WebCOwned
impl Sync for WebCOwned
impl Unpin for WebCOwned
impl UnwindSafe for WebCOwned
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)