[][src]Struct frugalos_segment::Client

pub struct Client { /* fields omitted */ }

セグメントにアクセスるために使用するクライアント。

Methods

impl Client[src]

pub fn new(
    logger: Logger,
    rpc_service: RpcServiceHandle,
    config: ClientConfig,
    ec: Option<ErasureCoder>
) -> Self
[src]

新しいClientインスタンスを生成する。

pub fn get(
    &self,
    id: ObjectId,
    deadline: Deadline,
    parent: SpanHandle
) -> impl Future<Item = Option<ObjectValue>, Error = Error>
[src]

オブジェクトを取得する。

pub fn head(
    &self,
    id: ObjectId,
    parent: SpanHandle
) -> impl Future<Item = Option<ObjectVersion>, Error = Error>
[src]

オブジェクトの存在確認を行う。

pub fn put(
    &self,
    id: ObjectId,
    content: Vec<u8>,
    deadline: Deadline,
    expect: Expect,
    parent: SpanHandle
) -> impl Future<Item = (ObjectVersion, bool), Error = Error>
[src]

オブジェクトを保存する。

pub fn delete(
    &self,
    id: ObjectId,
    _deadline: Deadline,
    expect: Expect,
    parent: SpanHandle
) -> impl Future<Item = Option<ObjectVersion>, Error = Error>
[src]

オブジェクトを削除する。

pub fn delete_by_version(
    &self,
    version: ObjectVersion,
    _deadline: Deadline,
    parent: SpanHandle
) -> impl Future<Item = Option<ObjectVersion>, Error = Error>
[src]

バージョン指定でオブジェクトを削除する。

pub fn delete_by_range(
    &self,
    targets: Range<ObjectVersion>,
    _deadline: Deadline,
    parent: SpanHandle
) -> impl Future<Item = Vec<ObjectSummary>, Error = Error>
[src]

バージョンの範囲指定でオブジェクトを削除する。

pub fn delete_by_prefix(
    &self,
    prefix: ObjectPrefix,
    _deadline: Deadline,
    parent: SpanHandle
) -> impl Future<Item = DeleteObjectsByPrefixSummary, Error = Error>
[src]

IDの接頭辞指定でオブジェクトを削除する。

pub fn list(&self) -> impl Future<Item = Vec<ObjectSummary>, Error = Error>[src]

保存済みのオブジェクト一覧を取得する。

pub fn latest(&self) -> impl Future<Item = Option<ObjectSummary>, Error = Error>[src]

セグメント内の最新オブジェクトのバージョンを取得する。

pub fn object_count(&self) -> impl Future<Item = u64, Error = Error>[src]

セグメント内に保持されているオブジェクトの数を返す.

Trait Implementations

impl Clone for Client[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Client

impl Sync for Client

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]