pub struct ProjectIdProxy { /* private fields */ }
Implementations§
Source§impl ProjectIdProxy
impl ProjectIdProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.fxfs/ProjectId.
Sourcepub fn take_event_stream(&self) -> ProjectIdEventStream
pub fn take_event_stream(&self) -> ProjectIdEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn set_limit(
&self,
project_id: u64,
bytes: u64,
nodes: u64,
) -> QueryResponseFut<ProjectIdSetLimitResult, DefaultFuchsiaResourceDialect>
pub fn set_limit( &self, project_id: u64, bytes: u64, nodes: u64, ) -> QueryResponseFut<ProjectIdSetLimitResult, DefaultFuchsiaResourceDialect>
Set the limit in bytes and node count for an XFS project id. Setting limits lower than
current usage is accepted but may in the future prevent further increases. Returns
ZX_ERR_OUT_OF_RANGE if project_id
is set to zero.
Sourcepub fn clear(
&self,
project_id: u64,
) -> QueryResponseFut<ProjectIdClearResult, DefaultFuchsiaResourceDialect>
pub fn clear( &self, project_id: u64, ) -> QueryResponseFut<ProjectIdClearResult, DefaultFuchsiaResourceDialect>
Stop tracking a project id. This will return ZX_ERR_NOT_FOUND if the project isn’t currently tracked. It will succeed even if the project is still in use more by one or more nodes.
Sourcepub fn set_for_node(
&self,
node_id: u64,
project_id: u64,
) -> QueryResponseFut<ProjectIdSetForNodeResult, DefaultFuchsiaResourceDialect>
pub fn set_for_node( &self, node_id: u64, project_id: u64, ) -> QueryResponseFut<ProjectIdSetForNodeResult, DefaultFuchsiaResourceDialect>
Apply project id to a node_id from a GetAttrs call. This will return ZX_ERR_NOT_FOUND if
node doesn’t exist, ZX_ERR_ALREADY_EXISTS if there is already a project_id
applied to
the node, and ZX_ERR_OUT_OF_RANGE if project_id
is set to zero.
Sourcepub fn get_for_node(
&self,
node_id: u64,
) -> QueryResponseFut<ProjectIdGetForNodeResult, DefaultFuchsiaResourceDialect>
pub fn get_for_node( &self, node_id: u64, ) -> QueryResponseFut<ProjectIdGetForNodeResult, DefaultFuchsiaResourceDialect>
Get the project id based on a given node_id from a GetAttrs call.This will return
ZX_ERR_NOT_FOUND if the node doesn’t exist, and a project_id
of zero if one is not
currently applied.
Sourcepub fn clear_for_node(
&self,
node_id: u64,
) -> QueryResponseFut<ProjectIdClearForNodeResult, DefaultFuchsiaResourceDialect>
pub fn clear_for_node( &self, node_id: u64, ) -> QueryResponseFut<ProjectIdClearForNodeResult, DefaultFuchsiaResourceDialect>
Remove any project id marker for a given node_id from a GetAttrs call. This will return ZX_ERR_NOT_FOUND if the node doesn’t exist, or success if the node is found to currently have no project id applied to it.
Sourcepub fn list(
&self,
token: Option<&ProjectIterToken>,
) -> QueryResponseFut<ProjectIdListResult, DefaultFuchsiaResourceDialect>
pub fn list( &self, token: Option<&ProjectIterToken>, ) -> QueryResponseFut<ProjectIdListResult, DefaultFuchsiaResourceDialect>
Fetches project id numbers currently tracked with a limit or with non-zero usage from lowest
to highest. If token
is null, start at the beginning, if token
is populated with a
previously provided next_token
the iteration continues where it left off. If there are
more projects to be listed then next_token
will be populated, otherwise it will be null.
Sourcepub fn info(
&self,
project_id: u64,
) -> QueryResponseFut<ProjectIdInfoResult, DefaultFuchsiaResourceDialect>
pub fn info( &self, project_id: u64, ) -> QueryResponseFut<ProjectIdInfoResult, DefaultFuchsiaResourceDialect>
Looks up the limit and usage for a tracked project_id
. If the project_id
does not have
a limit set, or non-zero usage it will return ZX_ERR_NOT_FOUND.
Trait Implementations§
Source§impl Clone for ProjectIdProxy
impl Clone for ProjectIdProxy
Source§fn clone(&self) -> ProjectIdProxy
fn clone(&self) -> ProjectIdProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProjectIdProxy
impl Debug for ProjectIdProxy
Source§impl ProjectIdProxyInterface for ProjectIdProxy
impl ProjectIdProxyInterface for ProjectIdProxy
type SetLimitResponseFut = QueryResponseFut<Result<(), i32>>
type ClearResponseFut = QueryResponseFut<Result<(), i32>>
type SetForNodeResponseFut = QueryResponseFut<Result<(), i32>>
type GetForNodeResponseFut = QueryResponseFut<Result<u64, i32>>
type ClearForNodeResponseFut = QueryResponseFut<Result<(), i32>>
type ListResponseFut = QueryResponseFut<Result<(Vec<u64>, Option<Box<ProjectIterToken>>), i32>>
type InfoResponseFut = QueryResponseFut<Result<(BytesAndNodes, BytesAndNodes), i32>>
fn set_limit( &self, project_id: u64, bytes: u64, nodes: u64, ) -> Self::SetLimitResponseFut
fn clear(&self, project_id: u64) -> Self::ClearResponseFut
fn set_for_node( &self, node_id: u64, project_id: u64, ) -> Self::SetForNodeResponseFut
fn get_for_node(&self, node_id: u64) -> Self::GetForNodeResponseFut
fn clear_for_node(&self, node_id: u64) -> Self::ClearForNodeResponseFut
fn list(&self, token: Option<&ProjectIterToken>) -> Self::ListResponseFut
fn info(&self, project_id: u64) -> Self::InfoResponseFut
Source§impl Proxy for ProjectIdProxy
impl Proxy for ProjectIdProxy
Source§type Protocol = ProjectIdMarker
type Protocol = ProjectIdMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Auto Trait Implementations§
impl Freeze for ProjectIdProxy
impl !RefUnwindSafe for ProjectIdProxy
impl Send for ProjectIdProxy
impl Sync for ProjectIdProxy
impl Unpin for ProjectIdProxy
impl !UnwindSafe for ProjectIdProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)