pub struct ServerBackend {
pub name: String,
pub url: Url,
pub group: Option<String>,
/* private fields */
}Fields§
§name: String§url: Url§group: Option<String>This is used for init but never after since people can edit groups in the UI so that field would be dead either way
Implementations§
Source§impl ServerBackend
impl ServerBackend
pub fn new(name: String, group: Option<String>, url: Url) -> Self
pub fn init(&self, compression: Compression) -> Result<bool>
pub fn attach(&self) -> Result<()>
Sourcepub fn access(&self) -> Result<Option<AccessResponse>>
pub fn access(&self) -> Result<Option<AccessResponse>>
What the current user can do on the project. None when they are not a member.
pub fn check_access(&self) -> Result<()>
Sourcepub fn manifest(
&self,
manifest: &UploadManifest,
) -> Result<UploadManifestResponse>
pub fn manifest( &self, manifest: &UploadManifest, ) -> Result<UploadManifestResponse>
Declares what an add is about to store. The server records every entry and
answers with the hashes it does not have, which are the only ones to store.
pub fn store(&self, req: StoreRequest<'_>) -> Result<StoreResult>
pub fn retrieve(&self, req: RetrieveRequest<'_>) -> Result<bool>
pub fn exists(&self, hashes: &Hashes) -> Result<bool>
pub fn remove(&self, _: &Hashes) -> Result<()>
pub fn get_audit_entries(&self, files: &[PathBuf]) -> Result<Vec<AuditEntry>>
Trait Implementations§
Source§impl Clone for ServerBackend
impl Clone for ServerBackend
Source§impl Debug for ServerBackend
impl Debug for ServerBackend
Source§impl<'de> Deserialize<'de> for ServerBackend
impl<'de> Deserialize<'de> for ServerBackend
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ServerBackend
impl PartialEq for ServerBackend
Source§impl Serialize for ServerBackend
impl Serialize for ServerBackend
impl StructuralPartialEq for ServerBackend
Auto Trait Implementations§
impl !Freeze for ServerBackend
impl RefUnwindSafe for ServerBackend
impl Send for ServerBackend
impl Sync for ServerBackend
impl Unpin for ServerBackend
impl UnsafeUnpin for ServerBackend
impl UnwindSafe for ServerBackend
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more