feat(tvix/castore/directory/get_recursive): add 'static to BoxStream
Necessary to directly use this in the GRPC DirectoryService wrapper directly. Change-Id: Ic6a0038a40dc30071d145af5035345fcd93288ae Reviewed-on: https://cl.tvl.fyi/c/depot/+/11634 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
		
							parent
							
								
									ed584b9296
								
							
						
					
					
						commit
						b26569028c
					
				
					 5 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -343,7 +343,7 @@ impl DirectoryService for BigtableDirectoryService {
 | 
			
		|||
    fn get_recursive(
 | 
			
		||||
        &self,
 | 
			
		||||
        root_directory_digest: &B3Digest,
 | 
			
		||||
    ) -> BoxStream<Result<proto::Directory, Error>> {
 | 
			
		||||
    ) -> BoxStream<'static, Result<proto::Directory, Error>> {
 | 
			
		||||
        traverse_directory(self.clone(), root_directory_digest)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -107,7 +107,7 @@ impl DirectoryService for GRPCDirectoryService {
 | 
			
		|||
    fn get_recursive(
 | 
			
		||||
        &self,
 | 
			
		||||
        root_directory_digest: &B3Digest,
 | 
			
		||||
    ) -> BoxStream<Result<proto::Directory, Error>> {
 | 
			
		||||
    ) -> BoxStream<'static, Result<proto::Directory, Error>> {
 | 
			
		||||
        let mut grpc_client = self.grpc_client.clone();
 | 
			
		||||
        let root_directory_digest = root_directory_digest.clone();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -73,7 +73,7 @@ impl DirectoryService for MemoryDirectoryService {
 | 
			
		|||
    fn get_recursive(
 | 
			
		||||
        &self,
 | 
			
		||||
        root_directory_digest: &B3Digest,
 | 
			
		||||
    ) -> BoxStream<Result<proto::Directory, Error>> {
 | 
			
		||||
    ) -> BoxStream<'static, Result<proto::Directory, Error>> {
 | 
			
		||||
        traverse_directory(self.clone(), root_directory_digest)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,7 +64,7 @@ pub trait DirectoryService: Send + Sync {
 | 
			
		|||
    fn get_recursive(
 | 
			
		||||
        &self,
 | 
			
		||||
        root_directory_digest: &B3Digest,
 | 
			
		||||
    ) -> BoxStream<Result<proto::Directory, Error>>;
 | 
			
		||||
    ) -> BoxStream<'static, Result<proto::Directory, Error>>;
 | 
			
		||||
 | 
			
		||||
    /// Allows persisting a closure of [proto::Directory], which is a graph of
 | 
			
		||||
    /// connected Directory messages.
 | 
			
		||||
| 
						 | 
				
			
			@ -87,7 +87,7 @@ where
 | 
			
		|||
    fn get_recursive(
 | 
			
		||||
        &self,
 | 
			
		||||
        root_directory_digest: &B3Digest,
 | 
			
		||||
    ) -> BoxStream<Result<proto::Directory, Error>> {
 | 
			
		||||
    ) -> BoxStream<'static, Result<proto::Directory, Error>> {
 | 
			
		||||
        self.as_ref().get_recursive(root_directory_digest)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -112,7 +112,7 @@ impl DirectoryService for SledDirectoryService {
 | 
			
		|||
    fn get_recursive(
 | 
			
		||||
        &self,
 | 
			
		||||
        root_directory_digest: &B3Digest,
 | 
			
		||||
    ) -> BoxStream<Result<proto::Directory, Error>> {
 | 
			
		||||
    ) -> BoxStream<'static, Result<proto::Directory, Error>> {
 | 
			
		||||
        traverse_directory(self.clone(), root_directory_digest)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue