pub struct Content { /* private fields */ }Expand description
Provides access to the content information for a repository
Implementations§
Source§impl Content
impl Content
Sourcepub fn get(&self, location: &str, ref_: &str) -> Future<Contents>
pub fn get(&self, location: &str, ref_: &str) -> Future<Contents>
Gets the contents of the location. This could be a file, symlink, or
submodule. To list the contents of a directory, use iter.
Sourcepub fn file(&self, location: &str, ref_: &str) -> Future<File>
pub fn file(&self, location: &str, ref_: &str) -> Future<File>
Information on a single file.
GitHub only supports downloading files up to 1 megabyte in size. If you need to retrieve larger files, the Git Data API must be used instead.
Sourcepub fn root(&self, ref_: &str) -> Stream<DirectoryItem>
pub fn root(&self, ref_: &str) -> Stream<DirectoryItem>
List the root directory.
Sourcepub fn iter(&self, location: &str, ref_: &str) -> Stream<DirectoryItem>
pub fn iter(&self, location: &str, ref_: &str) -> Stream<DirectoryItem>
Provides a stream over the directory items in location.
GitHub limits the number of items returned to 1000 for this API. If you need to retrieve more items, the Git Data API must be used instead.
Sourcepub fn create(
&self,
location: &str,
content: &[u8],
message: &str,
) -> Future<NewFileResponse>
pub fn create( &self, location: &str, content: &[u8], message: &str, ) -> Future<NewFileResponse>
Creates a file at a specific location in a repository. You DO NOT need to base64 encode the content, we will do it for you.
Auto Trait Implementations§
impl Freeze for Content
impl !RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl !UnwindSafe for Content
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