[−][src]Struct google_remotebuildexecution2::BuildBazelRemoteExecutionV2Directory
A Directory
represents a directory node in a file tree, containing zero or
more children FileNodes,
DirectoryNodes and
SymlinkNodes.
Each Node
contains its name in the directory, either the digest of its
content (either a file blob or a Directory
proto) or a symlink target, as
well as possibly some metadata about the file or directory.
In order to ensure that two equivalent directory trees hash to the same
value, the following restrictions MUST be obeyed when constructing a
a Directory
:
- Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed.
- Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution.
- The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes.
A Directory
that obeys the restrictions is said to be in canonical form.
As an example, the following could be used for a file named bar
and a
directory named foo
with an executable file named baz
(hashes shortened
for readability):
// (Directory proto)
{
files: [
{
name: "bar",
digest: {
hash: "4a73bc9d03...",
size: 65534
}
}
],
directories: [
{
name: "foo",
digest: {
hash: "4cf2eda940...",
size: 43
}
}
]
}
// (Directory proto with hash "4cf2eda940..." and size 43)
{
files: [
{
name: "baz",
digest: {
hash: "b2c941073e...",
size: 1294,
},
is_executable: true
}
]
}
This type is not used in any activity, and only used as part of another schema.
Fields
files: Option<Vec<BuildBazelRemoteExecutionV2FileNode>>
The files in the directory.
symlinks: Option<Vec<BuildBazelRemoteExecutionV2SymlinkNode>>
The symlinks in the directory.
directories: Option<Vec<BuildBazelRemoteExecutionV2DirectoryNode>>
The subdirectories in the directory.
Trait Implementations
impl Part for BuildBazelRemoteExecutionV2Directory
[src]
impl Default for BuildBazelRemoteExecutionV2Directory
[src]
impl Clone for BuildBazelRemoteExecutionV2Directory
[src]
fn clone(&self) -> BuildBazelRemoteExecutionV2Directory
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for BuildBazelRemoteExecutionV2Directory
[src]
impl Serialize for BuildBazelRemoteExecutionV2Directory
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for BuildBazelRemoteExecutionV2Directory
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for BuildBazelRemoteExecutionV2Directory
impl Unpin for BuildBazelRemoteExecutionV2Directory
impl Sync for BuildBazelRemoteExecutionV2Directory
impl UnwindSafe for BuildBazelRemoteExecutionV2Directory
impl RefUnwindSafe for BuildBazelRemoteExecutionV2Directory
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,